Hello,
I have a quite specific problem, and after half a day spent with
Google, still no solid answer.
The task:
I have to write a C# class Library ( DLL ) to handle TCP socket
communication. It will be called by a multithreaded server application
to send some data to an another server ( which is a linux server ).
There was already a very old ( unmanaged ) C++ dll, which used win32
sockets to do the communication, and I am required to replace it with a
managed C# DLL. The only information I have from this C++ DLL is the
data structures and response / error codes, and the function names and
parameters.
The question is - how?
My first idea was a static class with a single TcpClient to send the
data. Is this a viable method? Or I have to use asynchronous socket
functions? Or a spearate working thread with a Queue implented?
All the examples I found were:
- multithreaded SERVERS
- simple applications, not thread-safe class libraries
The problem with the current C++ comm layer DLL is that it gets struck
with more than 50 concurrent users.
Any help appreciated, thanks!
--