### Bind ServerSocket to specific IP Address

To bind bind a serversocket to a specific IP Address can be accomplished by using API Methods (requires the JavaObject library).
`Sub InitializeWithIp(Server As ServerSocket, EventName As String, Port As Int, ip As String)
Server.Initialize(0, EventName)
Dim ia As JavaObject
ia = ia.InitializeStatic("java.net.InetAddress").RunMethod("getByName", Array(ip))
Dim s As JavaObject = Server
Dim socket As JavaObject
socket.InitializeNewInstance("java.net.ServerSocket", Array(Port, 50, ia))
s.SetField("ssocket", socket)
End Sub`
Example
Dim ServerSocket1 As ServerSocket
InitializeWithIp(ServerSocket1, "ServerSocket1", 55555, "127.0.0.1")

Changed: , Category: Server, File: T6C246M1782.htm, ID: 1782