聊天室客戶端:
using system;
using system.collections.generic;
using system.componentmodel;
using system.data;
using system.drawing;
using system.linq;
using system.text;
using system.windows.forms;
using system.net.sockets;
using system.net;
using system.io;
using system.threading;
/// /// 傳送事件
///
///
///
private void btnsend_click(object sender, eventargs e)
this.lbsendcontent.items.add("客戶端說:" + this.txtsendcontent.text);
tcpclient tcpclient = new tcpclient();
tcpclient.connect(ipaddress.parse("192.168.0.187"), 9999);
networkstream ns = tcpclient.getstream();
if (ns.canwrite)
else
ns.close();
tcpclient.close();
}/// /// 修改顯示委託
///
///
protected delegate void updatedisplaydelegate(string text);
/// /// 監聽方法
///
public void listen()
);tcpclient.close();}}
/// /// 賦值給listbox控制項
///
///
public void updatedisplay(string text)}}
聊天室服務端:
using system;
using system.collections.generic;
using system.componentmodel;
using system.data;
using system.drawing;
using system.linq;
using system.text;
using system.windows.forms;
using system.net.sockets;
using system.net;
using system.threading;
using system.io;
private void btnsend_click(object sender, eventargs e)
this.lbsendcontent.items.add("服務端說:" + this.txtsendcontent.text);
tcpclient tcpclient = new tcpclient();
tcpclient.connect(ipaddress.parse("192.168.0.187"), 9998);
networkstream ns = tcpclient.getstream();
if (ns.canwrite)
else
ns.close();
tcpclient.close();
}/// /// 修改顯示委託
///
///
protected delegate void updatedisplaydelegate(string text);
/// /// 監聽方法
///
public void listen()
);tcpclient.close();}}
/// /// 賦值給listbox控制項
///
///
public void updatedisplay(string text)}}
Python聊天工具
import socket import sys import time import getopt from threading import thread class webchat 輸出幫助資訊 def usage self print help info python webchat.py ...
web開啟聊天工具
href skype chat 開始 skype 文字聊天a href skype userinfo 檢視 skype 資料a href skype add 新增到 skype 聯絡人列表a href skype call 開始 skype 語音呼叫a href skype voicemail 使用...
聊聊 聊天工具
公司搬家後,對網路的限制越來越嚴格,只允許訪問網頁,主流的聊天工具msn,qq都在禁止之列,雖然一片 聲,卻無濟於事。還好還有google的gtalk,在公司的網路高壓政策下還有一條出路,只是gtalk的朋友比較少,大部分客戶都在qq,msn上,客戶紛紛打 來問怎麼不上網了?真不知如何給客戶解釋公司...