Click here to Skip to main content
15,943,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
i have created an application.exe in VC++ CLR which could receive live data from server A, via the API...now i need to send the live data to another server B but dont have the DLL and API of that server,i got only IP,PORT,username,password of the server where i have to send the live data,this is the first time im doing this kind of program so i may be silly but im kind of confuse,can we connect without having api and dll??can anybody help or suggest me in this?
Posted

The first thing you have to know is the protocol the server uses. If it's a common one like HTTP you can use an off the shelf library e.g. wininet[^] or libcurl[^] to do the business for you.

If it's a proprietary protocol or one you specify then you're going to have to get a bit further down. There is a general API for networking: sockets and the windows implementation of sockets over TCP/IP is in WINSOCK.DLL.

While it won't show you how to program the sockets interface "Internetworking with TCP/IP: Principles, protocols, and architecture" by Douglas Comer will tell you all you want to know about the underlying TCP/IP protocols.

Unfortunately I've yet to find a really good book on sockets programming for windows . This[^] is an okay reference to the API itself. Hopefully someone else can give you a decent reference to a resource they've used. I haven't seen any I'd regard as more than mediocre so it'd be better if you did your own research here. If no-one else can give you a reference I'd search for "Windows sockets programming" and take it from there.
 
Share this answer
 
Comments
nv3 31-May-12 8:43am    
Comer is the best general reference I have come across so far. 5ed!
you can send data to server via network. For this you need to create socket , for this you need to know the IP,port etc, then you must know the protocol in which your server is expecting the data. then you send it. Windows provides socket API functions. Reading socket programming will help you to do that.
 
Share this answer
 
Comments
stib_markc 31-May-12 2:55am    
Isn't better to use SPC (Serial Port Communication) for faster transfer?
jk chan 31-May-12 3:01am    
network communication is faster than serial port. i havn't seen any streaming applications working over serial communication.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900