本周日,苏州开源盛宴,一起聊聊:Devops、K8s、数据库建模、SoLiD、.Net Core、微信开发、去中心化… 点击占座。
Metrics
0
Watch 9 Star 17 Fork 2

随风星海 / OhscePHP

Sign up for free
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
PHP HI-REL SOCKET TCP/UDP/ICMP/Serial .高可靠性PHP通信&控制框架SOCKET-TCP/UDP/ICMP/硬件Serial-RS232/422/485等 http://www.ohsce.org spread retract

http://www.ohsce.org

Clone or download
tcpclientExample.php 664 Bytes
Copy Edit Web IDE Raw Blame History
随风星海 authored 2017-02-09 23:31 . V0.2.0更新 20170209
<?php
/*
OHSCE_V0.2.0_B
高可靠性的PHP通信框架。
HTTP://WWW.OHSCE.ORG
@作者:林友哲 393562235@QQ.COM
作者保留全部权利,请依照授权协议使用。
*/
ini_set('memory_limit',"88M");//重置php可以使用的内存大小为64M
set_time_limit(0);
ob_implicit_flush(1);
include('loadohsce.php');
Ohsce_eng_socket_client($ohsceclient,'tcp',7626,'127.0.0.1'); //创建一个TCP客户端资源并连接27.0.0.1:7626
//echo Ohsce_socketread($ohsceclient['socket'],1024)[1]; //收取欢迎信息
Ohsce_socketsend($ohsceclient['socket'],'hello'); //发送数据
echo Ohsce_socketread($ohsceclient['socket'],1024)[1]; //收取回复数据
sleep(30);

Comment ( 0 )

You need to Sign in for post a comment

Help Search

14_float_left_people 14_float_left_close