5
如何通過WebSocket4Net DLL將Unity客戶端連接到PHP網絡服務器?我 嘗試過的例子一樣,Unity WebSocket4Net
using WebSocket4Net;
WebSocket websocket = new WebSocket("ws://localhost:2012/");
websocket.Opened += new EventHandler(websocket_Opened);
websocket.Error += new EventHandler<ErrorEventArgs>(websocket_Error);
websocket.Closed += new EventHandler(websocket_Closed);
websocket.MessageReceived += new EventHandler(websocket_MessageReceived);
websocket.Open();
private void websocket_Opened(object sender, EventArgs e)
{
websocket.Send("Hello World!");
}
,但沒有得到結果