SstUrl fetch receive timeout

37 views
Skip to first unread message

Louis LaBrunda

unread,
Apr 26, 2025, 3:54:16 PMApr 26
to VAST Community Forum
Hi All,

Does anyone know if there is a receive timeout for a SstUrl fetch call like this:

(SstUrl fromString: 'http://ipinfo.io/loc') fetch.

I don't think I would need to change it, I just don't want it to hang forever.

Lou

Mariano Martinez Peck

unread,
Apr 26, 2025, 6:31:57 PMApr 26
to va-sma...@googlegroups.com
Hi Louis,

Maybe something like this:

| url client result |

url := 'http://ipinfo.io/loc' sstAsUrl.

client := SstHttpClient forTransportScheme: url localEndpointUrl transport.

client startUp.

client configuration receiveTimeout: 10000.

result := client get: url.

result isSstError

ifTrue: [  result errorObject = 'Input Stream Empty'

ifTrue: [ self error: 'Timeout reached'. ]

ifFalse: [

"Generic Sst Error"

result raise

]

]

ifFalse: [ 

"Everything OK"

result basicContents asString inspect.

].

client shutDown. 






--
You received this message because you are subscribed to the Google Groups "VAST Community Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to va-smalltalk...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/va-smalltalk/68fc70e8-1447-4bfd-9656-359982f71bc3n%40googlegroups.com.


--

Mariano Martinez Peck

VAST Lead Consultant

Senior Software Engineer

 mp...@instantiations.com
 @MartinezPeck
 /mariano-martinez-peck
 instantiations.com
TwitterLinkedInVAST Community ForumGitHubYouTubepub.dev

Louis LaBrunda

unread,
Apr 27, 2025, 10:35:02 AMApr 27
to VAST Community Forum
Hi Mariano,

Thanks for the reply.  I like it!  I haven't fully tested it yet but see no reason why it shouldn't work great.

I very much like NOT having to know what the Transport Scheme is as a string in order to setup the SstHttpClient.  It is too easy to have a mismatch between the URL and the Transport Scheme if both are defined from strings that a person enters.  The URL has to be that way.  Getting the Transport Scheme from that URL is perfect.  Unless I'm missing something.

Lou

Louis LaBrunda

unread,
Apr 27, 2025, 10:59:19 AMApr 27
to VAST Community Forum
Does anyone know if there is a connect timeout?  I can't seem to find it.

Lou

Wayne Johnston

unread,
Apr 28, 2025, 6:58:41 AMApr 28
to VAST Community Forum
I suspect it is a question for the operating system.
Reply all
Reply to author
Forward
0 new messages