The resource would handle the socket data from the interface (where you would implement the bulk of the dispatcher logic). So, you would have to go into the C# code and handle the server-side of the logic there. Specifically, the SocketHandler file line 55 downwards.
You’d then have to recompile the DLL and upload to the server.
As for sending data from the interface, you would have to call the websockets function send to send data to the server. More information can be found here
Since the latest update i have been unable to run two live maps off the same IP just different ports. i have two servers on the same ip address and i was always able to run them off the same ip just different sockports but its not been working i been getting this error.
Exception during executing Post callback: System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted.
at System.Net.Sockets.Socket.Bind (System.Net.EndPoint localEP) [0x00043] in <7d13762c3f3046279fc4d30c52f6f595>:0
at vtortola.WebSockets.Transports.Sockets.SocketListener..ctor (vtortola.WebSockets.Transports.Sockets.SocketTransport transport, System.Net.EndPoint[] endPointsToListen, System.Net.Sockets.ProtocolType protocolType, vtortola.WebSockets.WebSocketListenerOptions options) [0x000ba] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
at vtortola.WebSockets.Transports.Tcp.TcpListener..ctor (vtortola.WebSockets.Transports.Tcp.TcpTransport transport, System.Net.EndPoint[] endPointsToListen, vtortola.WebSockets.WebSocketListenerOptions options) [0x00000] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
at vtortola.WebSockets.Transports.Tcp.TcpTransport+<ListenAsync>d__39.MoveNext () [0x00157] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at vtortola.WebSockets.WebSocketListener+<StartAsync>d__22.MoveNext () [0x00363] in <4fa23baef5524ca6ae016d7d9fe505e5>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at Havoc.Live_Map.WebSocketServer+<Start>d__14.MoveNext () [0x0006e] in <f24e395ee07f432ebbebe727ba6c4c0f>:0
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at CitizenFX.Core.CitizenSynchronizationContext+<>c__DisplayClass1_0.<Post>b__0 () [0x00000] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\CitizenTaskScheduler.cs:20
at CitizenFX.Core.CitizenSynchronizationContext.Tick () [0x0003e] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\CitizenTaskScheduler.cs:38
OK, so it could be that you already have something listening on those ports which, is why the error is occurring…
The only thing I can suggest is you keep changing the socket port until you find one that isn’t already bound. Maybe start at 31120 and increment them?
yeah, i had it as 30122 and 30123 so I changed it to make sure cause it was the 30122 that was doing it before now its the 30124 doing it to me. what kinda numbers can I use like for instance does it have to be above 3000 or can i use something such as 13 as a port
so i did as you said to. i changed the port on the live map that was having a conflict. then it started working but not the one that was fine it was working just fine i didnt change it but now its not. so i stopped the one that was good and restarted the one that was bad and it began working.
You have to be in-game to use the command. This is because the only way to get the blips from the game is to use the game’s natives. Thus, you need to be in game (the server can’t run this code).
At some point I will do some more checks on the server to make sure that you can’t run this command in RCon.