C Builder中用socketapi来写网络通讯程序(1)计算机等级考试
文章作者 100test 发表时间 2010:01:01 13:03:25
来源 100Test.Com百考试题网
Socket api Client:
#ifndef UDPClientH
#define UDPClientH
#include
#include
#include
#include
#include
#include "CCEdit.h"
#define WM_SOCK WM_USER 100
class TLANForm : public TForm
{
__published: // IDE-managed Components
TEdit *Port.
TLabel *Label1.
TLabel *Label2.
TComboBox *Prot.
TButton *Button1.
TLabel *Label3.
TEdit *Addr.
TCCEdit *TxtEdit.
void __fastcall FormCreate(TObject *Sender).
void __fastcall Button1Click(TObject *Sender).
void __fastcall FormDestroy(TObject *Sender).
private: // User declarations
void __fastcall OnRecv(TMessage