iOS Question Socket with Textwriter

goehberry

Member
Licensed User
Longtime User
Hi Everyone,

in b4a i usually this code below

Sub Process_Globals
Dim txt As TextWriter
Dim Socket1 As Socket​
end sub

sub Testing
Socket1.Initialize("Socket1")
Socket1.Connect("192.168.1.168",9100,5000)​
end sub

Sub Socket1_Connected(Connected As Boolean)As Boolean
If Connected = True Then
txt.Initialize(Socket1.OutputStream)
txt.Write(pesan)
txt.Flush
txt.Close
Socket1.Close
End If​
End Sub

ini B4i, i couldn't find the replacement for Textwriter...I tried with AsyncStreamstext and AsyncStreams but it is not working like it should...

Please help guys....

Thank you in advance
 

goehberry

Member
Licensed User
Longtime User
Hi Aaronk, Thanks I finally made it work...

Hi Erel, my code in B4A was to print to network printer, and it was running okay. But maybe I miss something. Can you please advise what suppose to be the update? Thank you in advance!
 
Upvote 0

Similar Threads

D
  • Question
iOS Question Timeserver (solved)
Replies
14
Views
2K
Deleted member 103
D
Replies
120
Views
178K
Top