// デシリアライズ public static WebSocketParams Deseiralize(string fileName) { WebSocketParams wsp = null; try { using (StreamReader sr = new StreamReader(fileName, Encoding.UTF8)) { wsp = new XmlSerializer(typeof(WebSocketParams)).Deserialize(sr) as WebSocketParams; } } catch { } if (wsp == null) { wsp = new WebSocketParams(); wsp.Init(); wsp.Serialize(fileName); } return(wsp); }
public WebSocketServer(WebSocketParams wsp) { this._wsp = wsp; }
public WebSocketClient(WebSocketParams wsp) { this._wsp = wsp; }