How to send messg to another pc

need some code to send any data to another pc using tcp/ip and ipx not at the same time..
need some nice "open" code.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

To send over IP the best optoin to me is

Now using IPX i'm interested too.

T++, Radler.
If you want to do this in a protocol neutral fasion, as in no matter which protocol is run the same code works, you should use named pipes for sending and receiving data over a network.  Named Pipes are implemented using NetBios, which is supported on all 3 common protocols run on windows (Netbeui, TCP/IP, IPX/SPX).  Coding is very simple, much like normal file I/O for the most part.  Let me know if you want some examples or something.

fpiette is the best point as he said..
I'm also interested in ipx..
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

God_AresAuthor Commented:
i do not want to use netbui i don't like the protocol.
What you should (could) do is: Use the ClientSocket and ServerSocket components found on the "internet" section of your component palette.

The ServerSocket encapsulates the host part, the client the calling part of the WinSock API. The server can accept multiple connections, the client cannot. Drop both components on the from if both applications need to be able to "call" each other.

What you need to do to use them:

* Drop a ServerSocket on the host application and a ClientSocket on the client app. Set their "port" property to the same value, which is not already in use (avoid things like 80, 21 and such - Smash your numerical keypad once and you should get a nice random number :-)

* Make sure the ServerSocket's "active" property is "true", this will keep the server in "listening" mode, ready to accept connections.

* Set the clients "address" property to the IP-address of the host, or its "host" property to the hosts IP-address or its computername or URL ("").

* Set the clients "active" property to true or call ClientSocket.Open;

* The client will now start searching for the host, and the event "onLookup" will occur.

* Once the host is found, both sides establish a connection and both "onConnect" events occur.

* You can now reach the connections through (correct me if I'm wrong but I usually program with the Help file handy which I don't currently have):
ClientSocket.Socket OR
ServerSocket.Socket.Connection[x], where x is the number of the connection. The serversocket has a property which contains the number of open connections, so you can iterate trough them.

* You can send data, or a string with
  ClientSocket.Socket.SendText() or ClientSocket.Socket.SendBuf(). These can also be used at the host end of the connection.

* Once either sides receives a transmission, the "onRead" event triggers. This event is passed the socket that triggered it, so you can read the data through Socket.ReadText() or Socket.ReadBuf().

Watch out: The maximum of data a TCP/IP end can contain at a time is 8192 bytes. If more data is received before it is read, the "onRead" event does trigger but the data is lost (Don't try to transmit entire files at once :-)

If you have any other questions, e-mail me at I don't know if I get back here anytime soon :-).
I can e-mail an example if you want...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I don't know about IPX...
God Ares, I wasnt suggesting that you use Netbeui.  Netbeui is a protocol.  I said you should consider using NETBIOS.  Netbios IS NOT a protocol.  It is a programming interface which runs on top of a network protocol.  It is mush the same thing as sockets are to TCP/IP, except it is protocol independant, meaning it can be used on top of any supported protocol.  Like I said it is supported over TCP/IP, IPX/SPX, and Netbuei.  While I think nrico's suggestion is also a good one, it depends on what you are after here.  His method will only work using the TCP/IP protocol.  Although winsock can be used over IPX, it isnt commonly done.  I just wanted to clarify my earlier comment.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.