[Solved] Linux socket not accepting

BlitzMax Forums/BlitzMax Programming/[Solved] Linux socket not accepting

Vanessa(Posted 2015) [#1]
Whenever I execute the following code snippet under Linux, I receive the Runtime Error regarding the SocketAccept every time the program is launched. When this same code is executed under Windows, no such error occurs and the code accepts client connections as expected. I suspect it's an issue with permissions, but I'm not sure. Any ideas?

Local Socket:TSocket = CreateTCPSocket()
	BindSocket( Socket, 1234 )
	
	If Not Socket Then
		RuntimeError("Could not bind socket")
	Else
		Info("Started server")
	EndIf	
	
	While Not CloseBackend
		
		Local Giveup=False
		
		Local Accept:TSocket = SocketAccept( Socket,100 )
		
		If Not Accept Then
			RuntimeError("Could not listen to socket")
		Else
			Info("Started listening to socket")
		EndIf
		
		SocketListen(Accept)
		
		Local SocketStream:TStream = CreateSocketStream(Accept);



Vanessa(Posted 2015) [#2]
I apologise, I just realized I was looking at an older version of my code file. The newer version works as expected.