C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 08-04-2009, 08:02 AM   #1
Registered User
 
Join Date: Aug 2009
Posts: 2
C-Windows-Socket-(Client/Server)

Hi,
i am new to this board and start with a question. I am trying to set up a Windows Client/Server Application written in C. What i found so far is how to set up a Linux connection. But the requirement is to use Windows XP and i do not find any solution. Maybe someone would be so kind and give some help to me.

Best Regards
EyesOnly is offline   Reply With Quote
Old 08-04-2009, 09:17 AM   #2
Registered User
 
Join Date: Jan 2009
Posts: 26
hi and Welcome EyesOnly,

on windows, winsock has a similar API.
by connection i assume you mean you want to use TCP.

one of the differences is, on windows you have to call:
- WSAStartup() before you call winsock functions
and
- WSACleanup() after you are done using winsock

tutorials:
- Winsock Networking Tutorial (C++) - MadWizard.org
i liked this one because its nice and short. i used mainly this one (but it's not complete if you are planning to use non-blocking sockets) it also has a really useful ( but a bit old ) reference manual of winsock 2 which helps alot http://www.madwizard.org/download/sock2.zip

- Beej's Guide to Network Programming
and i used this one a little ( its for linux but the API is very similar )

maybe you could be a bit more specific about your exact problem

Last edited by symbiote; 08-04-2009 at 09:21 AM.
symbiote is offline   Reply With Quote
Old 08-05-2009, 12:29 AM   #3
Registered User
 
Join Date: Aug 2009
Posts: 2
Thanks for your help. What i am planning to do is to creat a piece of software that communicats over ethernet via TCP (prefered) using a Windows OS. For this communication i need a Server that listens on a special port for requests and a client that creates requests and get response from the server. I wrote such a piece of software in Jave there it is very easy to port it from linux to windows because of platform independency. If you like i can post my Java source code it is very similar to the to what i m planning to do in C. The client and server shall be used for vertical cross communication between some PCs that control modules of a machine. And these client and server shall communicate to start and stop the single modules when they have to wait for the next one (The communicaton with the machine is non-ethernet-communication)
EyesOnly is offline   Reply With Quote
Old 08-06-2009, 11:12 AM   #4
Registered User
 
Join Date: Sep 2004
Location: California
Posts: 2,845
I don't see how posting your java code here will get you any closer to a solution (unless you are hoping someone will just do the port for you).

You need to read the links posted up above, and then start writing code. You can post questions here when you run into any specific problems that you encounter, and we will help you with those.
__________________
bit∙hub [bit-huhb] n. A source and destination for information.
bithub is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with simple socket client/server program spencer88 C Programming 6 05-05-2009 11:05 PM
Just starting Windows Programming, School me! Shamino Windows Programming 17 02-22-2008 08:14 AM
how to make a windows application crvenkapa C++ Programming 3 03-26-2007 09:59 AM
Question.. pode Windows Programming 12 12-19-2004 07:05 PM
IE 6 status bar DavidP Tech Board 15 10-23-2002 05:31 PM


All times are GMT -6. The time now is 05:24 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22