[BUG]Can't accept socket connections on Windows?
Andreas Raab
andreas.raab at gmx.de
Mon Aug 18 17:12:20 UTC 2003
This isn't actually a bug. The combination of #listenOn: with the #accept
primitive is invalid. One has to use #listenOn:backlogSize: if one wants to
be able #accept: a connection afterwards, as #listenOn: will perform an
implicit 'inplace accept' operation (e.g., once the status changes to
connected it _has_ accepted the connection). I wrote a message about this a
while ago but I can't find it off-hand.
Cheers,
- Andreas
> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
> Behalf Of S.J.Chun
> Sent: Monday, August 18, 2003 7:02 PM
> To: squeak-dev at lists.squeakfoundation.org; julian at beta4.com
> Subject: Re: [BUG]Can't accept socket connections on Windows?
>
>
> Does this problem fixed? If so, how can I get the fix? Thanks
> in advance.
>
> ----- Original Message -----
> From: julian at beta4.com
> To: squeak-dev at lists.squeakfoundation.org
> Sent: Mon, 18 Aug 2003 15:09:39 +0900 (KST)
> Subject: [BUG]Can't accept socket connections on Windows?
>
> I don't seem to be able to accept socket connections in Windows XP.
> This using 3.6beta #5395 with the latest 3.5 VM from squeak.org.
>
> I originally tried using KomServices (which required changing a
> #waitForAcceptUntil: to #waitForSocketFor:) and then tried
> using Socket
> directly, and then tried ConnectionQueue and all seem to exhibit the
> same problem.
>
> The following walkback comes up after executing the following do-it:
>
> socket _ Socket newTCP .
> socket listenOn: 5222.
> (socket waitForAcceptFor: 30).
> socket closeAndDestroy.
>
> It works fine if you don't make a connection within the 30
> seconds. But
> if you make a connection then you get the following
> walkback. Anyone
> have any ideas? I may well be doing something entirely
> wrong <shrug>...
>
> Julian
>
>
> 17 August 2003 10:58:28 pm
>
> VM: Win32 - Squeak3.5 of '11 April 2003' [latest update: #5180]
> Image: Squeak3.6beta [latest update: #5395]
>
> Socket(Object)>>error:
> Receiver: a Socket[destroyed]
> Arguments and temporary variables:
> aString: 'a primitive has failed'
> Receiver's instance variables:
> semaphore: a Semaphore()
> socketHandle: nil
> readSemaphore: a Semaphore()
> writeSemaphore: a Semaphore()
> primitiveOnlySupportsOneSemaphore: true
>
> Socket(Object)>>primitiveFailed
> Receiver: a Socket[destroyed]
> Arguments and temporary variables:
>
> Receiver's instance variables:
> semaphore: a Semaphore()
> socketHandle: nil
> readSemaphore: a Semaphore()
> writeSemaphore: a Semaphore()
> primitiveOnlySupportsOneSemaphore: true
>
> Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:
> Receiver: a Socket[destroyed]
> Arguments and temporary variables:
> aHandle: a ByteArray(1 184 151 28 0 0 0
> 0 52 234 85 0)
> rcvBufSize: 8000
> sndBufSize: 8000
> semaIndex: 15
> Receiver's instance variables:
> semaphore: a Semaphore()
> socketHandle: nil
> readSemaphore: a Semaphore()
> writeSemaphore: a Semaphore()
> primitiveOnlySupportsOneSemaphore: true
>
>
> Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex
> :readSemaI
> ndex:writeSemaIndex:
> Receiver: a Socket[destroyed]
> Arguments and temporary variables:
> aHandle: a ByteArray(1 184 151 28 0 0 0
> 0 52 234 85 0)
> rcvBufSize: 8000
> sndBufSize: 8000
> semaIndex: 15
> aReadSema: 16
> aWriteSema: 17
> Receiver's instance variables:
> semaphore: a Semaphore()
> socketHandle: nil
> readSemaphore: a Semaphore()
> writeSemaphore: a Semaphore()
> primitiveOnlySupportsOneSemaphore: true
>
>
> --- The full stack ---
> Socket(Object)>>error:
> Socket(Object)>>primitiveFailed
> Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex:
>
> Socket>>primAcceptFrom:receiveBufferSize:sendBufSize:semaIndex
> :readSemaI
> ndex:writeSemaIndex:
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Socket>>acceptFrom:
> [] in Socket class>>acceptFrom:
> BlockContext>>repeatWithGCIf:
> Socket class>>acceptFrom:
> Socket>>accept
> Socket>>waitForAcceptFor:
> UndefinedObject>>DoIt
> Compiler>>evaluate:in:to:notifying:ifFail:
> [] in TextMorphEditor(ParagraphEditor)>>evaluateSelection
> BlockContext>>on:do:
> TextMorphEditor(ParagraphEditor)>>evaluateSelection
> TextMorphEditor(ParagraphEditor)>>doIt
> [] in TextMorphEditor(ParagraphEditor)>>doIt:
> TextMorphEditor(Controller)>>terminateAndInitializeAround:
> TextMorphEditor(ParagraphEditor)>>doIt:
> TextMorphEditor(ParagraphEditor)>>dispatchOnCharacter:with:
> TextMorphEditor>>dispatchOnCharacter:with:
> TextMorphEditor(ParagraphEditor)>>readKeyboard
> TextMorphEditor>>readKeyboard
> [] in TextMorphForEditView(TextMorph)>>keyStroke:
> TextMorphForEditView(TextMorph)>>handleInteraction:fromEvent:
> TextMorphForEditView>>handleInteraction:fromEvent:
> TextMorphForEditView(TextMorph)>>keyStroke:
> TextMorphForEditView>>keyStroke:
> TextMorphForEditView(TextMorph)>>handleKeystroke:
> KeyboardEvent>>sentTo:
> TextMorphForEditView(Morph)>>handleEvent:
> TextMorphForEditView(Morph)>>handleFocusEvent:
> [] in HandMorph>>sendFocusEvent:to:clear:
> PasteUpMorph>>becomeActiveDuring:
> HandMorph>>sendFocusEvent:to:clear:
> HandMorph>>sendEvent:focus:clear:
> HandMorph>>sendKeyboardEvent:
> HandMorph>>handleEvent:
> HandMorph>>processEvents
> [] in WorldState>>doOneCycleNowFor:
> Array(SequenceableCollection)>>do:
> WorldState>>handsDo:
> WorldState>>doOneCycleNowFor:
> WorldState>>doOneCycleFor:
> PasteUpMorph>>doOneCycle
> [] in Project class>>spawnNewProcess
> [] in BlockContext>>newProcess
>
>
>
More information about the Squeak-dev
mailing list
|