Need help with multiple socket server

  • Thread starter Thread starter Winston Nimchan
  • Start date Start date
W

Winston Nimchan

Hi:

I would like to build a socket server application that is user configurable
using XML (app.config) and would like some guidance.

I already have a single socket server working but would like to convert this
to a multi-socket application

I would like to specify in the app.config one or more socket, buffer size &
the business layer object/class to use when a message is received on each
socket

Any help will be appreciated.

Thanks

Winston
 
Hi Winston!

In the text you wrote you never said anything about using synchorous or
asyncrhonous sockets. I believe from what you wrote however that you are
working with synchrous sockets.

A listening socket is in it self capable to accept more than one incoming
connection. I would suggest you to read this article.

http://www.codeguru.com/Csharp/Csharp/cs_network/sockets/article.php/c7695/

Fetching settings from a app.config file is not hard. I don't remeber right
now how to do it in .Net 1.1. but in .Net 2.0 all you need to do is to create
a System.Configuration.AppSettingsReader and then use the GetValue method in
order to get values stored in the config file.

Personally I prefere to use datasets when reading/writing settings to a file
thought. (DataSet ReadXml and WriteXml methods);

I hope this will help you to some extent

//Mikael
 
Hi,


You could create one thread for each kind of connection ( port #/ App to
call )

cheers,
 
I am using Asynchronous Sockets. How do I call different objects based on
App.config xml settings?

Regards

Winston
 
Back
Top