strange socket behavior

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

strange socket behavior

Stefan Krecher
Hi,
i'm running gst in an android-scriting environmemt, so i'm not sure if this
is an android-scripting/ s4la or an gst issue.
Using tcp sockets im sending json to a scripting host ("json-rpc").
Everything works fine except that the server sends responses only after i
call "socket close". So the responses to request are going into nowhere. I
can see this via a serverlog and via tcpdump.
Same behavior with StreamSocket, TCP.Socket or NetClients. HTTP.HTTPClient
...
If i make the request via Smalltalk system: '...'  using netcat to send
json to the server, everything seems to be ok ...
Any ideas what is happening?
regards,
Stefan
_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: strange socket behavior

Holger Freyther
On Wed, Jun 20, 2012 at 08:11:58PM +0200, Stefan Krecher wrote:
> If i make the request via Smalltalk system: '...'  using netcat to send
> json to the server, everything seems to be ok ...
> Any ideas what is happening?

sound like buffering to me. Can you flush the socket at a specific
point?

holger

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: strange socket behavior

Stefan Krecher
2012/6/20 Holger Hans Peter Freyther <[hidden email]>:
> On Wed, Jun 20, 2012 at 08:11:58PM +0200, Stefan Krecher wrote:
>> If i make the request via Smalltalk system: '...'  using netcat to send
>> json to the server, everything seems to be ok ...
>> Any ideas what is happening?
>
> sound like buffering to me. Can you flush the socket at a specific
> point?

i tried flushing on the client side - that did not help. I also looked
at the serverside-code - it's java and straightforward, the socket was
flushed after writing ...

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: strange socket behavior

Holger Freyther
On Wed, Jun 20, 2012 at 10:48:57PM +0200, Stefan Krecher wrote:
>
> i tried flushing on the client side - that did not help. I also looked
> at the serverside-code - it's java and straightforward, the socket was
> flushed after writing ...

You might not have netstat on Android, but somewhere in /proc there is
a file that tells you the size of the unread and unsent bytes. I only
had crashes with the socket code (all of them are fixed), never any
unexpected behavior.

I am not tracking Android closely but does it have some kind of per
application network filtering? Forcing nagel on every application?


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk