Communication with a NetWork Device
Hi peers
As we know a number of devices eg printer & telephony system communicate via a network port with an TCP/IP address. My little experience using CDO object, with the handling of it associated strings, makes me think that there will an object in VB6.SP6 that will allow us to communicate with such devices. I would also think that this object will transmit the packets from the PC to the device with the necessary header so that the device can handle / reassemble & understand what the PC wants.
From the foregoing i seeking advice on the following:
1. What object in VB6.SP6 will do the job and will the learning curve for this be steep?
2. What are typical format of string / language that eg a net work printer or telephony system, will understand and how does one go about getting the documentation from the vendor ie ask the right questions.
Thanks in advance.
Re: Communication with a NetWork Device
In VB6 the Winsock control is used for TCP/IP and UDP applications. There's plenty of examples in this Forum (just serach for Winsock). The learning curve isn't that steep as long as you remember that TCP/IP and UDP are asynchronous protocols. Reading and writing data over a network is nothing like reading and writing data from and to a file. You have no control over how many bytes may arrive in one DataArrival event. With TCP/IP the only thing you can be sure of is that all the data will eventually arrive (or a suitable error will be raised). This means you normally have to buffer the data until it's all arrived. This is where your second question is important, in order to know when all the data has arrived you need an Application Protocol which describes the 'conversation' between a device or program and your program or device. It is the definition / details of this Application Protocol that you should be requesting from vendors.
Re: Communication with a NetWork Device
Thanks mate, will dig in & tinker with it.
On a similar note, does it mean that winsock object will also listen to the communication from the network device?
Re: Communication with a NetWork Device
Yes, data is bi-directional. ie Winsock can send and receive data to and from other networked devices. (given you know the IP Address and Port)
Re: Communication with a NetWork Device
Thanks again, till we meet again.
PS think i need further help now. In one of the sample, it use mswinsck.ocx but this is not evident in the VB6.SP1 i am using in XpWin.sp3. Am i on the right path?