Hi, can you help me?
Well, I have the next problem.
When the socket is connected, (socket1_connected event... succsful = true)
I have the next error //Object was not initialized (NSInputStream)
how can I fix these problem?
I can see that the socket, have inpusStream only read, how can I initialize that?
// PS. sorry if my English is no good
Thanks
Aviles
Well, I have the next problem.
When the socket is connected, (socket1_connected event... succsful = true)
I have the next error //Object was not initialized (NSInputStream)
how can I fix these problem?
I can see that the socket, have inpusStream only read, how can I initialize that?
// PS. sorry if my English is no good
Thanks
Aviles
B4X:
Sub Process_Globals
Dim socket1 As Socket
Dim stream As AsyncStreams
Dim serverIp As String
Dim serverPort As Int
End Sub
public Sub initialize
serverIp = xxxx
serverPort =xxxx
socket1.Initialize("socket1")
socket1.Connect(serverIp, serverPort, 3000)
end sub
private Sub Socket1_Connected (Successful As Boolean)
Try
If Successful Then
addLog("ConexionEstablecida", 1)
stream.Initialize(socket1.InputStream, socket1.OutputStream, "stream")
else
reconnect
end if
catch
end try
end sub
Attachments
Last edited: