C# OnReceived Event is fired twice -
i'm relatively new c# , had stumbled across issue onreceived event triggered twice first time doesn't update subscriber instead update on second times. below of codes used in program. appreciate if can have , tell me cause at. i have this. public tcpmain() { socketservice.tcpclient.onconnected += new socketservice.tcpclient.onconnectedhandler(client_onconnected); socketservice.tcpclient.ondatareceived += new socketservice.tcpclient.ondatareceivedhandler(client_ondatareceived); socketservice.tcpclient.ondisconnected += new socketservice.tcpclient.ondisconnectedhandler(client_ondisconnected); socketservice.tcpclient.onstatus += new socketservice.tcpclient.onstatushandler(client_onstatus); socketservice.tcpclient.onstatus2 += new socketservice.tcpclient.onstatus2handler(client_onstatus2); } public tcpmain(string remoteserverip, int remoteserverport, int remoteserverport2, string localip = "", int localport = 0)...