473,387 Members | 3,821 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,387 software developers and data experts.

Sockets - C#

Hello group,
I amlooking into a connection oriented socket which can
connect to a port on a remote machine and wait(on the same connection)
till it responds back. I would have to do this as the source cannot
sent multiple requests at the same time. The requests has to be queued
and sent one at a time. Any help would be great!

Thanks,
Sam.

Jun 2 '06 #1
2 1188
Are you writing the server side code? Can you not stick the desired
IPEndPoints into a simple queue on one thread and pop them off as a response
is recieved (which will happen on a threadpool thread anyway)?

Obviously this would need to be thread safe, ie using this synclock property
of the queue object when 'push'ing or 'pop'ing

Sorry if this is all dutch but its kind of hard to judge what your situation
is from you OP ;)

<sr*****@mailcity.com> wrote in message
news:11*********************@f6g2000cwb.googlegrou ps.com...
Hello group,
I amlooking into a connection oriented socket which can
connect to a port on a remote machine and wait(on the same connection)
till it responds back. I would have to do this as the source cannot
sent multiple requests at the same time. The requests has to be queued
and sent one at a time. Any help would be great!

Thanks,
Sam.

Jun 2 '06 #2
Thanks for the reply. The sever side has already been implemented on a
different platform which uses sockets. And, it was designed such that
the server sends a response/ack as soon as it processes the request. I
need to implement the client.

Thanks,
Sam.

light of mind. heavy of belly wrote:
Are you writing the server side code? Can you not stick the desired
IPEndPoints into a simple queue on one thread and pop them off as a response
is recieved (which will happen on a threadpool thread anyway)?

Obviously this would need to be thread safe, ie using this synclock property
of the queue object when 'push'ing or 'pop'ing

Sorry if this is all dutch but its kind of hard to judge what your situation
is from you OP ;)

<sr*****@mailcity.com> wrote in message
news:11*********************@f6g2000cwb.googlegrou ps.com...
Hello group,
I amlooking into a connection oriented socket which can
connect to a port on a remote machine and wait(on the same connection)
till it responds back. I would have to do this as the source cannot
sent multiple requests at the same time. The requests has to be queued
and sent one at a time. Any help would be great!

Thanks,
Sam.


Jun 3 '06 #3

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...
1
by: Dmitry Akselrod | last post by:
Hello everyone, I have a vb.net application that wraps the TCPListener object in a class. The server connects to the local interface and establishes itself on port 9900. It then polls for...
0
by: mrpolitics | last post by:
So I'm working with PureIRCD (http://sourceforge.net/projects/pure-ircd) and everything was fine untill yesterday when the server crashed. So I did a cold restart and staretd the server back up...
3
by: Logan McKinley | last post by:
I have a C# program that uses blocking sockets and want to allow the user to stop the server. The problem I am having is the socket blocks on...
1
by: Adam Clauss | last post by:
I am (attempting) to move an existing socket application to use raw sockets. Right now, my application is essentially a port forwarder. Upon receiving a connection, it will open a connection to...
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: Michael Maercker | last post by:
hi! i'm really not into networking at all and have now been asigned the task of porting a vb6-code into vb.net (compact framework, in this case) and the code uses the winsock-control. i quickly...
3
by: J C | last post by:
Hi, I'm using UDPClient to make a simple DNS server. I notice that intermittently and unpredictibly I get: Unhandled Exception: System.Net.Sockets.SocketException: An existing connection...
7
by: Adam01 | last post by:
Im using cygwin to test the code of a server I am writing. I've included sys/types.h, sys/socket.h, netdb.h, and arpa/inet.h. And this is the output.. ../../../sockets.cpp: In constructor...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.