gettingstarted
[Top] [All Lists]

Re: linux console app and server sockets

To: "evLSiN" <evlsin at gmail dot com>, "Getting Started" <gettingstarted at lists dot realsoftware dot com>
Subject: Re: linux console app and server sockets
From: "Aaron Ballman" <aaron at realsoftware dot com>
Date: Sun, 29 Aug 2004 21:30:58 -0500
Cc:
Delivered-to: gettingstarted at lists dot realsoftware dot com
References: <b374cece0408291915732aa1c3 at mail dot gmail dot com> <03d301c48e38$0a8e0990$0200a8c0 at Circe> <b374cece04082919307fd0b93b at mail dot gmail dot com>
> Function AddSocket() As TCPSocket
>    dim sock as drafterconnection

You're not making a new instance of the socket.  I think you mean to say:
dim sock as new drafterconnection
instead.

>    app.numConnects = app.numConnects + 1

At this point, the socket isn't connected.  It's just being added to an
internal pool.  Just a nit to pick.  ;-)

>    print "Adding Socket "+cstr(app.numConnects)+chr(13)
>    return sock
> End Function

This code, as it's currently written, will cause NilObjectExceptions to be
thrown by the ServerSocket since the socket being returned is actually nil.

HTH!

~Aaron

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>