i would like create multi-serverSocket to listen in same Application like this :
B4X:
Sub Process_Globals
Public server1 As ServerSocket
Public server2 As ServerSocket
Public AStream As AsyncStreams
End Sub
Sub AppStart (Args() As String)
server1.Initialize(5566, "server1")
server1.Listen
server2.Initialize(5562, "server2")
server2.Listen
StartMessageLoop
End Sub
No. However it will be easier to implement it in a class and create multiple instances of the class, each one with a different port (you can pass it in the Initialize call).