Chapter 5. Using the Windows CE WinSock for IR Communication

Team-Fly    

  
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications
By Chris Tacke, Timothy Bassett
Table of Contents


IN THIS CHAPTER

  • A Brief Socket Tutorial

  • Understanding the WinSock Control

  • Writing the PocketChat Application

  • PCChat

Socket communications are generally the same regardless of the development environment. For Windows there is the Windows Sockets standard, and for Unix there is the Berkeley Sockets standard, but the differences especially for our purposesaren't important.

Socket communication in eMbedded Visual Basic is almost identical to Visual Basic 6, so the information covered here isn't as environment specific as the rest of the book.

"Why include it then?" you might ask. The answer is that transferring data to or from a Pocket PC requires some mode of connectivity, and socket communication is probably the simplest.

The WinSock control included with VB 6 has two protocols available, TCP/IP and UDP. eVB doesn't support UDP, but it does give us the addition of infrared, or IrDA, support. You'll see that using the IrDA port is almost transparent.

With a strong understanding of socket communication, you'll be well on your way to being able to build your first distributed or enterprise solution.

This chapter explores most of the power and functionality of socket programming exposed through the MSCEWinsockCtl library. The usefulness of a Pocket PC application grows exponentially when it can communicate with other Pocket PCs, desktop PCs, and even enterprise servers. In addition the simplicity and ease of using the WinSock control makes it a natural choice for communication.

In this chapter you will learn about

  • The basics of socket communication

  • Connecting to another Pocket PC or desktop PC through a socket

  • Listening for connection requests from any socket server

  • Establishing two-way communication between your Pocket PC and another

  • Transferring text back and forth in a "chat" program

  • Transferring text files to another socket client

  • Creating and using a custom progress bar

You will also briefly review the use of the MenuBar.

As we'll do with all the chapters, we will also uncover some of eVB's more subtle nuances that can cause problems and headaches , as well as give coding tips applicable to any eVB application.


Team-Fly    
Top
 


eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net