public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* TCP server ports
@ 2017-09-14  9:28 Peter
  2017-09-14 17:18 ` Per Bothner
  0 siblings, 1 reply; 2+ messages in thread
From: Peter @ 2017-09-14  9:28 UTC (permalink / raw)
  To: Kawa mailing list

Hello!

Is there a kawa-specific way to open a server tcp port, listen for
clients, and get back a normal Scheme I/O port when someone connects?

Thanks for any help with this!
Greetings, Peter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: TCP server ports
  2017-09-14  9:28 TCP server ports Peter
@ 2017-09-14 17:18 ` Per Bothner
  0 siblings, 0 replies; 2+ messages in thread
From: Per Bothner @ 2017-09-14 17:18 UTC (permalink / raw)
  To: Peter, Kawa mailing list

On 09/14/2017 02:28 AM, Peter wrote:
> Hello!
> 
> Is there a kawa-specific way to open a server tcp port, listen for
> clients, and get back a normal Scheme I/O port when someone connects?
> 
> Thanks for any help with this!

Not that I know of.  But you can use standard Java class and methods
directly in Kawa-Scheme.

   (define socket (listen-for-socket)) ; make your own listen-for-socket
   (define inp (gnu.kawa.io.InPort (socket:getInputStream)))

BTW if you write
     socket:input-stream
Kawa will automatically treat it like
      (socket:getInputStream)
-- 
	--Per Bothner
per@bothner.com   http://per.bothner.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-09-14 17:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-14  9:28 TCP server ports Peter
2017-09-14 17:18 ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).