[Gambas-user] A simple server question
Jussi Lahtinen
jussi.lahtinen at ...626...
Fri Sep 27 18:24:33 CEST 2013
You read and write to same socket?
It has been long since I have done any network programming, but that seems
bit odd.
Jussi
On Fri, Sep 27, 2013 at 5:01 PM, M. Cs. <mohareve at ...626...> wrote:
> Hello, I am trying to write a Gambas frontend for a Java server. I have
> written a short class for that purpose:
>
> Static App As SSocket
> Public messenger As Socket
> Public Sub _new()
> messenger = New Socket As "socket"
> messenger.Connect("localhost", 4444)
> End
>
> Public Sub socket_Read()
> Dim sCad As String
> Read #messenger, sCad, Lof(messenger)
> FMain.myscreen.Text = sCad
> End
>
> Public Sub Send(s As String)
> Write #messenger, s, Len(s)
> Flush
> End
>
> While it works from Java to Gambas (it displays the incoming messages) I am
> not able to send the message towards Java. I try to do that with a button's
> click, which then invokes the Send(s As String) method. What am I doing
> wrong?
>
> Thanks!
>
> Csaba
>
> ------------------------------------------------------------------------------
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most
> from
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
More information about the User
mailing list