473,324 Members | 2,268 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Sockets (Urgent)

Hi all,
I'm quite new in C# and have no expirience in sockets.
I have no idea how to implement the following app, but for expirienced
developer, I suppose it should be very trivial...

I have to write any server component very urgent...
The component has to synchronize between 3 clients for perpetual work of
one of them.

My app works with several clients, says C1, C2, C3.
I know IP and Port of each client. Every time should be only one working
client. On the start my program has to send to C1 any parameters. If it
succeeded the program sleeps all the time C1 works. If C1 failed down
(the program or whole computer) my app has to catch it and try to
connect to C2.
If working any client except C1 my app has to try if possible to connect
to C1 and if yes, disconnect from C2 or C3 and connect to C1.

Any samples of code will be very helpful.

Thanks a lot,

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
1 1155
Hi,

Why don't you use Remoting instead of raw sockets? You can publish the three
clients (c1, c2, c3) with minimum work. Also, you can use load balance on
remoting so you make sure that only one customer executes at one time.

On remoting you can use synchronic and asynch calls where you can register a
delegate that will let you know if the call failed or not, so you can decide
to retry on other registered remoting address.

Hope this helps
Salva
--
Salvador Alvarez Patuel
Exony Ltd - London, UK
"Yuri Ch" wrote:
Hi all,
I'm quite new in C# and have no expirience in sockets.
I have no idea how to implement the following app, but for expirienced
developer, I suppose it should be very trivial...

I have to write any server component very urgent...
The component has to synchronize between 3 clients for perpetual work of
one of them.

My app works with several clients, says C1, C2, C3.
I know IP and Port of each client. Every time should be only one working
client. On the start my program has to send to C1 any parameters. If it
succeeded the program sleeps all the time C1 works. If C1 failed down
(the program or whole computer) my app has to catch it and try to
connect to C2.
If working any client except C1 my app has to try if possible to connect
to C1 and if yes, disconnect from C2 or C3 and connect to C1.

Any samples of code will be very helpful.

Thanks a lot,

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tero Saarni | last post by:
Hi, I have several threads communicating with each other using events stored in Queues. Threads block on Queue.get() until somebody publishes an event in thread's event queue. I need to add...
5
by: mak | last post by:
Dear Friends, I'm working on real time stock quotes display. Using Async tcp sockets in .net csharp. Client software running perfect on LAN and ISDN but not good on ip dialup. After lot of...
4
by: BadOmen | last post by:
Hi, What is the different between 'System.Net.Sockets.Socket' and 'System.Net.Sockets.TcpClient'? When do I use System.Net.Sockets.TcpClient and System.Net.Sockets.Socket?? Yours, Jonas
3
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from...
4
by: sd1978 | last post by:
Hi, I have placed a webservice in the webserver. When I access it from a webpage, default.aspx on a click of a button i get the following error: No connection could be made because the target...
4
by: newlearner | last post by:
Hi, I wrote a socket program to pass message form client and server. This is a test case and to be inplemented in the later stage. In my test case the connection between the server and the...
0
by: avinashibs | last post by:
Hi, i want to receive mail from my mail server through vb.net using sockets, could any one please help me with code. it's very urgent requirement for me. Thanks,
5
by: Kenny D | last post by:
I am having trouble sending streams of data from one socket to another using the following code. When the transmitter is running on the same machine as the receiver, the data transmits...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.