Object objData = LCDlabel.Text; byte[] byData = System.Text.Encoding.UTF8.GetBytes(objData.ToString()); for (int i = 0; i < m_clientCount; i++) { if (m_workerSocket[i] != null) { if (m_workerSocket[i].Connected) { m_workerSocket[i].Send(byData,byData.Length,SocketFlags.None); } } }
while (true) { try { byte[] rvdMsgByte = new byte[dis.available()]; if(rvdMsgByte.length!=0) { for (int i = 0; i < rvdMsgByte.length; i++) rvdMsgByte[i] = dis.readByte(); String rvdMsgTxt = new String(rvdMsgByte); if(rvdMsgTxt!=c_text) { receivedMsg.setText(rvdMsgTxt); } } } catch (IOException ex) { Logger.getLogger(Recive_Massage.class.getName()).log(Level.SEVERE, null, ex); }
rvdMsgByte
for (int i = 0; i < rvdMsgByte.length; i++)
for (int i = 0; i < rvdMsgByte.length; i++) { rvdMsgByte[i] = dis.readByte(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)