Re: Communicate with UNIX
TCP/IP protocol
See the Documentation...
TCP/IP - Message Based Client/Server Overview
Didi,
As the previous post indicated, use TCP/IP. Here are some more details and some other things to consider.
1) To perform simple communication between UNIX an NT, perform socket calls. You will need to create a Server program on your UNIX box, that will run and respond to client requests. Your NT client will connect to the socket, write data to it and wait for the server. When the server gets a connection, it will read data from the client, perform your logic, (perhaps read/ write data from a database) and write data back to the socket. Finally, the client will read data from the socket. Viola, its message based client/server.
2) Send your data between client and server in a network neutral format, like ASCII strings. If you plan to data send structures, remember that UNIX and NT represent numbers in different formats. Also keep byte packing in mind if sending structures see the /Z options for the Visual C++ compiler.
3) If you plan on having many clients connect to your server, you probably want the server to spawn off another thread to reply to the client.
4) You will want to perform significant error handling on your client during each message call. I would recommend performing all message based calls using an architecture layer.
5) Include some time-out logic in your client program, in case something goes terribly wrong with your server program.
Hope this helps, I know it’s pretty high level. My company has extensive experience doing this type of message based client/server programming from both Visual C++ and Visual Basic on NT, and HP and SUN server platforms. We offer a complete set of solutions to get your client/server project off the ground. Drop me a line if you would like some sample code, or some help with your project.
William Walseth
<a href="mailto:[email protected]</a>
Re: TCP/IP - Message Based Client/Server Overview
Hello William.
This was interesting tip, but mabe i can get more detalized info about it.
I tried to communicate with you trough e-mail but i get returned mail with error that this email does'nt exists.
So maybe You can send me some tips.