全文预览

基于TCP协议的网络通信系统的设计与实现

上传者:梦&殇 |  格式:docx  |  页数:20 |  大小:195KB

文档介绍
r = FPara.SqlReader("select * from TCP_UserInfo where UserAccount=H, + Accounts + FPara.connStr);Рif (usdr != null)Р{Рif (usdr.Read())Р{Р#region此处写入返冋注册失败的代码РSocket sc = (Socket)alSock[alSock.IndexOf(uc, 0)];Рsc.Send(chat);Р#endregionР}РelseР{Р#region此处写入插入数据库用户注册信息的代码РStream ms = new MemoryStream();РSocket sc = (Socket)alSock(alSock.IndexOf(uc, 0)1;Р讦(FPara.SqlCmd(”insert into TCP_UserInfo (UserAccount.UserNickname.UserEmai IJoinDate.UserTP.UserPassword) values(nr + umessage.Accounts + n7r, + umessage.N ickname + ,M,H, + umessage.Email +?+ System.DateTime.Now. ToStringO +?+Р((IPEndPoint)uc.RemoteEndPoint).Address.ToString() +?+ umessage.Password +РFPara.connStr) == null)Р{Рumessage.Info = 1;Р—translator.Serialize(ms, umessage); byte[] d = new bytefms.Length];Рms.Seek(0, SeekOrigin.Begin);

收藏

分享

举报
下载此文档