Consoles and Sockets

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Consoles and Sockets

Ian Bartholomew-19
Is it possible to use Dolphin's socket package in a Console application?.
My first play would seem to indicate that you can't but I'm not convinced
that it's not my code that's the problem :-).

My aim is to run a console app that listens to a socket and responds to
input by replying over the socket connection.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Consoles and Sockets

Christopher J. Demers
"Ian Bartholomew" <[hidden email]> wrote in message
news:c4kl6c$2hnasp$[hidden email]...
> Is it possible to use Dolphin's socket package in a Console application?.
> My first play would seem to indicate that you can't but I'm not convinced
> that it's not my code that's the problem :-).
>
> My aim is to run a console app that listens to a socket and responds to
> input by replying over the socket connection.

It did not work for me when I tried it a few years ago.  I tried to make a
smart whois program.  I did not find out it would not work until after I
finished writing it. :(  The explanation I got was that the Dolphin Sockets
depended upon windows.  For some reason I have a vague feeling like that may
change in D6.

Here is the thread from my last experience:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&threadm=9ab11h%244g9io%241%40ID-50880.news.dfncis.de&rnum=1&prev=/groups%3Fq%3Dwhois%2Bgroup:comp.lang.smalltalk.dolphin%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%26group%3Dcomp.lang.smalltalk.dolphin%26safe%3Doff%26selm%3D9ab11h%25244g9io%25241%2540ID-50880.news.dfncis.de%26rnum%3D1

Chris


Reply | Threaded
Open this post in threaded view
|

Re: Consoles and Sockets

Ian Bartholomew-19
Christ,

> It did not work for me when I tried it a few years ago.  I tried to
> make a smart whois program.  I did not find out it would not work
> until after I finished writing it. :(  The explanation I got was that
> the Dolphin Sockets depended upon windows.

Thanks for the confirmation.  That fits in with what I was seeing where the
deployed app failed around #hookWindowCreate.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Consoles and Sockets

Chris Uppal-3
In reply to this post by Ian Bartholomew-19
Ian,

> My aim is to run a console app that listens to a socket and responds to
> input by replying over the socket connection.

I have a small console app that does the reverse, connects to the server then
waits for a reply.  It seems to work OK -- though there's always the
possibility that I'm doing something wrong and it's working "by luck".

Chris Demers's post reminded me that I needed to add a small (but *amazingly*
ugly) hack to the preStripScript:

=============
    "turn off ability to do asynch socket ops"
    SocketAbstract basicCompile:  'allowAsyncEvents'
=============

For the background see the thread called:
    "Console app + networking: a suggestion"
that I started on 2003/06/10.

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: Consoles and Sockets

Ian Bartholomew-19
Chris,

> For the background see the thread called:
>     "Console app + networking: a suggestion"
> that I started on 2003/06/10.

Thanks Chris.  I can't say I follow all of that thread but it does tell me
that it's probably more trouble than it's worth.  I'll have another look
when the new D6 sockets become available.

I've decided to go with a normal app, albeit minimised to the taskbar tray,
for the time being - I understand that a little better:-)

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.