[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Pnet runtime support for networking

From: Rhys Weatherley
Subject: Re: [DotGNU]Pnet runtime support for networking
Date: Tue, 05 Mar 2002 10:18:28 +1000

Silvernerd wrote:

> As far as I know it isn't possible to open a network connection with C
> under Linux using only normal io functions, so it would become hard for
> me to create the socket class with only the normal io functions. Or am I
> missing something here?

You need to add some "InternalCall" methods for the
socket operations.  We will then implement these calls
in the runtime engine just like the normal io stuff.  e.g.

extern public void Listen(int backlog);

When you add such a declaration, also update "native.html"
to document the additional InternalCall methods.  Then we
will know what needs to be implemented in the engine.

The important thing is this: only add InternalCall methods
for things that you cannot implement in C#.  For example,
there are 4 different versions of "Receive".  3 of them can
be implemented in terms of the fourth, so make the fourth
InternalCall, and then call it from the others.

Although Unix can use "read" for both files and sockets,
do not use the normal io functions for this.  There are
some systems that do not use file descriptors for sockets,
so it is important to keep the functionality separate so
we can support such systems.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]