I come from a *nix socket programming background, and there you could just pass the actual socket file descriptor which is just an unsigned int. I don't think this will work in your case though. I would just create a new thread to handle the request.
There are a couple of ways but the most common approach is by using sockets. Check out System.net.sockets for not only the socket class itself but the TcpClient class which is really quite useful. Luckily, c# seems to abstract away :) most of the underlying stuff needed for socket programming...
You instantiate objects in c# like in java. Actually, since you are a c++ guy, it's like defining a pointer to an object then instantiating the object by creating a new one. Here is an example:
C#/Java
SomeClass objMyObject = new SomceClass("someargs");
Which is pretty much equivalent to...
First remove the ; at the end of the class declaration. It's no longer needed. As for the public:/private: I know it's no longer needed and possible no longer even legal. You would want to write it loike this:
class aClass
{
public aClass(int iniInt){ theInt=iniInt; }
public...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.