Closed nguyenhaian closed 7 years ago
Hey, for now try to comment out code that shows error. Don't use HttpConnectProxy in project for now. Comment out two methods in Socket.cs: 1] public Channel getChannelByName(string name) 2] public void setProxy(string host, int port) { var proxy = new HttpConnectProxy(new IPEndPoint(IPAddress.Parse(host), port)); _socket.Proxy = (SuperSocket.ClientEngine.IProxyConnector)proxy; }
If there are just 3 errors you have listed above this might fix it. If it is working we can replace above methods with another code.
@sacOO7 thank you. I can now connect to server.
When I import this lib into Unity game engine, there are errors.
Assets/socketcluster/ScClient/Proxy/HttpConnectProxy.cs(75,35): error CS1061: Type
System.Net.EndPoint' does not contain a definition for
ConnectAsync' and no extension methodConnectAsync' of type
System.Net.EndPoint' could be found. Are you missing an assembly reference?Assets/socketcluster/ScClient/Proxy/HttpConnectProxy.cs(145,39): error CS1061: Type
byte[]' does not contain a definition for
SearchMark' and no extension methodSearchMark' of type
byte[]' could be found. Are you missing an assembly reference?Assets/socketcluster/ScClient/Socket.cs(74,29): error CS0121: The call is ambiguous between the following methods or properties:(this System.Collections.Generic.IEnumerable, System.Func<ScClient.Socket.Channel,bool>)'
System.Linq.LINQ.FirstOrDefault<ScClient.Socket.Channel>(this System.Collections.Generic.IEnumerable<ScClient.Socket.Channel>, System.Predicate<ScClient.Socket.Channel>)' and
System.Linq.Enumerable.FirstOrDefaultCan anyone help me? Thank you.