SDK Programming Guide Version 1.511
ABLELink
R
Ethernet-Serial Server MAXI Series
}
recv_f = _OK ;
//----- process receive data here
recv_cnt = cb->recvlen ;
recvbuf_ptr = ( unsigned char far *)cb->recvbuf ;
//----- response message
ret = tcp_send( cb->handle, "Hello, I receive data =", 24, send_post, NULL_ARG);
ret = tcp_send( cb->handle, recvbuf_ptr, recv_cnt, send_post, NULL_ARG);
ret = tcp_send( cb->handle, "\r\n", 2, send_post, NULL_ARG);
//----- request to receive next data
ret = tcp_receive( cb->handle, (unsigned char far *)recvbuf_ptr, DEF_MSS, recv_post, NULL_ARG);
if ( ret != SUCCESS ) {
connect_f = _ERR;
}
}
void _loadds far connect_post( CMDBLK far *cb, void far *arg)
{
//----- check connect success or not
if( cb->retcode != SUCCESS ) {
return;
}
connect_f = _OK;
//----- request to receive data
// tcp_receive( cb->handle, (unsigned char far *)recvbuf, sizeof(recvbuf), recv_post, 0l );
}
void _loadds far listen_post( CMDBLK far *cb, void far *arg)
{
//----- check listen success or not
if( cb->retcode != SUCCESS ) {
connect_f = _ERR ;
Copyright © 2004 Atop Technologies, Inc.
All rights reserved. Designed in Taiwan.