Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ C++/CLI MFC CLR
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 30-May-12 21:28pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Comments
nv3 at 31-May-12 8:43am
   
Comer is the best general reference I have come across so far. 5ed!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
stib_markc at 31-May-12 2:55am
   
Isn't better to use SPC (Serial Port Communication) for faster transfer?
jk chan at 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)

  Print Answers RSS
0 OriginalGriff 190
1 Jochen Arndt 165
2 PIEBALDconsult 150
3 BillWoodruff 148
4 DamithSL 140
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web04 | 2.8.141220.1 | Last Updated 31 May 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100