Вверх ↑
Ответов: 1328
Рейтинг: 69
#1: 2009-12-17 21:13:23 ЛС | профиль | цитата
TCP_ServerEx выдает Runtime error при подключении клиента, эта же схема нормально работает в 4.2 179
Add(MainForm,6678,217,350)
{
Left=312
Top=322
Height=145
}
Add(Message,20231,385,350)
{
Message="Client disconnect!"
Caption="Server"
}
Add(Button,85596,483,259)
{
Left=200
Top=40
Font=[Arial,8,0,0,1]
Caption="close"
link(onClick,96010:doClose,[])
}
Add(TCP_Client,96010,574,252)
{
Port=180
IP="127.0.0.1"
link(onRead,14313:doAdd,[])
link(onConnect,36990:doMessage,[(633,265)(633,314)])
link(onDisconnect,90966:doMessage,[(625,272)(625,356)])
}
Add(Button,7637,217,189)
{
Left=20
Top=15
Font=[Arial,8,0,0,1]
Caption="open"
link(onClick,4557003:##open,[(279,195)(279,251)])
}
Add(Button,53265,217,259)
{
Left=20
Top=40
Font=[Arial,8,0,0,1]
Caption="close"
link(onClick,4557003:doClose,[(279,265)(279,258)])
}
Add(Button,24613,217,301)
{
Left=20
Top=65
Font=[Arial,8,0,0,1]
Caption="send"
Data=String(Hello!)
link(onClick,4557003:doSend,[(283,307)(283,265)])
}
Add(ListBox,92252,413,252)
{
Left=85
Top=15
Width=100
Height=70
Font=[Arial,8,0,0,1]
}
Add(Button,98765,483,301)
{
Left=200
Top=65
Font=[Arial,8,0,0,1]
Caption="send"
Data=String(I am Client!!)
link(onClick,96010:doSend,[(545,307)(545,272)])
}
Add(ListBox,14313,644,252)
{
Left=265
Top=15
Width=110
Height=70
Font=[Arial,8,0,0,1]
}
Add(Button,67336,483,217)
{
Left=200
Top=15
Font=[Arial,8,0,0,1]
Caption="open"
link(onClick,96010:doOpen,[(545,223)(545,258)])
}
Add(Message,4920,385,308)
{
Message="Client connect!"
Caption="Server"
}
Add(Message,90966,644,350)
{
Message="I'am disconnect!"
Caption="Client"
}
Add(Message,36990,644,308)
{
Message="I'am connected!"
Caption="Client"
}
Add(TCP_ServerEx,4557003,308,245)
{
ServerPort=180
link(onRead,92252:doAdd,[(393,251)(393,258)])
link(onConnect,4920:doMessage,[(372,258)(372,314)])
link(onDisconnect,20231:doMessage,[(362,265)(362,356)])
}
BEGIN_SDK
Add(EditMultiEx,9971778,3,3)
{
WorkCount=#6:##open|7:doClose|6:doSend|
EventCount=#6:onRead|9:onConnect|12:onDisconnect|
VarCount=#2:IP|6:Active|
Width=650
Height=333
link(doClose,916654:doClose,[(57,16)(57,181)])
link(doSend,916654:doSend,[(57,23)(57,188)])
link(IP,916654:IP,[(9,272)(125,272)])
link(Active,916654:Active,[(16,272)(118,272)])
}
Add(TCP_Connection,916654,112,175)
{
link(onRead,9971778:onRead,[(398,181)(398,9)])
link(onConnect,9971778:onConnect,[(398,188)(398,16)])
link(onDisconnect,9971778:onDisconnect,[(398,195)(398,23)])
}
END_SDK
Add(Timer,92181,217,399)
{
link(onTimer,1422106:doData,[])
}
Add(Label,82216,483,406)
{
Left=85
Top=90
Width=100
Font=[Arial,8,0,0,1]
}
Add(Case,14075018,329,399)
{
Value=Integer(1)
DataOnTrue=String(connect)
link(onNextCase,6963502:doData,[])
link(onTrue,2274620:doString,[(373,412)(373,468)])
}
Add(HubEx,12831850,462,406)
{
link(onEvent,82216:doText,[])
}
Add(DoData,1422106,280,399)
{
link(onEventData,14075018:doCase,[])
link(Data,4557003:Active,[(286,338)(321,338)])
}
Add(DoData,6963502,406,399)
{
link(onEventData,12831850:doWork1,[(466,405)])
}
Add(FormatStr,2274620,385,462)
{
link(onFString,12831850:doWork2,[(440,468)(440,412)])
link(Str2,4557003:IP,[(398,386)(314,386)])
}


карма: 2

0