-
message
Hi
I develop an windows application using vb.net and sql server
I want to send the message to another user who are login
to the application. I can access the Ip address of every
user.
Can any body guide how to send the messge to another user.
thanks
asm
-
Re: message
You would want to use TCP Sockets. Try a search as there is allot of info already on the forums for it.
System.Net.System.Net.Sockets
-
Re: message
i'm about to check that out too because i had a question along the same lines. but that would allow you to send instant messages?
-
Re: message
instant messages, you mean like IM applications? Yeah you can do that.
-
Re: message
Whatever you send via the socket is only delayed by the network speed/location. So its just about instant, yes.
-
Re: message
what i'm trying to understand is this part...
say i have 4 computers and i want to set up a chat server type application instead of an instant messanger... do i have to set the listen and send protocals on the program?
do i need a server or is tcp a direct connection between two instances of the running program?
-
Re: message
No, for that setup you would need one instance running on one workstation and it would request a connection to some other workstation. Each instance would be listening and sending. Basically a peer to peer workgroup. You can set up a client/server scenerio where one dedicated workstation will always be sending and receiving directing traffic to those that are communicating wth each other vs each communicating directly with each other. Either way they all will need to send and receive or Listen and transmit.
-
Re: message
3 alternatives:
1- Each client tries to connect aother clients and this is too hard...
2- User will give the command to connect a client (only messaging with 1 client sametime :( )
3- The Best thing is to have a server. Every client connects to server and send their messages as strings. For example: Mes|User1|Nickname|Hi how are you?
Server will send this to all clients ( even to sender ) Every client will get it and split it with split function. And write it to a textbox, listbox or whatever.
I suggest you to use 3rd one. You can do it easily and manage everything like setting passwords, taking log, saving messaging etc...
-
Re: message
i'm interested in what you said about directly talking to each other, sort of like an instant messenger. how would i go about setting that up?
is there code avaliable on the internet that would allow me to do that so i don't have to type from scratch?
would it be possible or logical to put it in the background worker?