Networking Forums

Networking Forums > Computer Networking > Windows Networking > Can a server initiate communication with a client?

Reply
Thread Tools Display Modes

Can a server initiate communication with a client?

 
 
ahmed.maryam@gmail.com
Guest
Posts: n/a

 
      03-15-2007, 11:08 PM
Hi all,

I have a weird situation here in that I've designed two C#
applications that need to communicate with each other using sockets.
So I am trying to set the applications up in a way that one acts like
the 'server' and the other a 'client'. However, the 'server' is an
application that does some work, and one if its jobs is to launch the
other application and start communicating with it when a user clicks a
certain button. The other application will then open up and begin
passing data back and forth with the 'server'. The problem is, how do
I get the SERVER to INITIATE communication with a CLIENT instead of
waiting for a connection the way servers traditionally do?

Any ideas how I could approach this problem? Thanks!

~ M

 
Reply With Quote
 
 
 
 
ahmed.maryam@gmail.com
Guest
Posts: n/a

 
      03-16-2007, 12:33 AM
Nevermind I figured out a solution to the problem. If anybody's
interested, the way I solved the problem was allowing my server to
call "sock.Listen", and then when the other application was launched,
I called "socket.Connect" in the client, passing it the IP address and
Port of the server. This way I can develop communication between two
C# applications where the server launches the client.

Thanks for reading!

~ Maryam

On Mar 15, 8:08 pm, ahmed.mar...@gmail.com wrote:
> Hi all,
>
> I have a weird situation here in that I've designed two C#
> applications that need to communicate with each other using sockets.
> So I am trying to set the applications up in a way that one acts like
> the 'server' and the other a 'client'. However, the 'server' is an
> application that does some work, and one if its jobs is to launch the
> other application and start communicating with it when a user clicks a
> certain button. The other application will then open up and begin
> passing data back and forth with the 'server'. The problem is, how do
> I get the SERVER to INITIATE communication with a CLIENT instead of
> waiting for a connection the way servers traditionally do?
>
> Any ideas how I could approach this problem? Thanks!
>
> ~ M



 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Communication Issue James McKenzie Windows Networking 2 01-17-2008 10:16 PM
Longhorn Server and Vista communication problem Raptor Windows Networking 0 06-19-2007 03:27 PM
Client will not initiate a hangup on an internet connection Shirlee Wireless Networks 0 09-26-2004 06:47 PM
Flakey Server can't initiate a network connection. Paul Rogers Linux Networking 6 10-17-2003 06:23 AM
Flakey Server can't initiate a network connection. Paul Rogers Linux Networking 0 10-15-2003 07:11 AM



1 2 3 4 5 6 7 8 9 10 11