December 30th Monday 2009
来源:互联网 发布:阿里巴巴数据图片尺寸 编辑:程序博客网 时间:2024/06/01 15:29
-module(test_tcp).
-compile(export_all).
go(S) ->
send("192.168.1.99", 9001, S).
send(Host, Port, Str) ->
{ok, Socket} = gen_tcp:connect(Host, Port, [binary, {packet, 0}]),
ok = gen_tcp:send(Socket, Str),
wait(Socket).
wait(Socket) ->
receive
{tcp, Socket, Bin} ->
io:format("Client received binary = ~p~n", [Bin]),
wait(Socket);
{tcp_closed, Socket} ->
io:format("A connection is shut down. ~n"),
gen_tcp:close(Socket)
end.
The above is a little erlang program to test the biogine program during developing.
- December 30th Monday 2009
- December 21th Monday 2009
- December 28th Monday 2009
- December 7th Monday
- 2008 December 1th Monday
- 2008 December 8th Monday
- 2008 December 15th Monday
- 2008 December 22th Monday
- 2008 December 29th Monday
- December 17th Monday (十二月 十七日 月曜日)
- December 3th Monday (十二月 三日 月曜日)
- December 10th Monday (十二月 十日 月曜日)
- December 24th Monday (十二月 二十四日 月曜日)
- December 3th Thursday 2009
- December 4th Friday 2009
- December 15th Tuesday 2009
- December 16th Wednesday 2009
- December 17th Tuesday 2009
- ubuntu 下 gd 的支持
- Spring 源码分析
- WM_CTLCOLOR和OnCtlColor消息的用法
- 关于对话框的一些知识点
- 业界资讯:adobe 技术开发中心 放出游戏单元
- December 30th Monday 2009
- asp.net 动态加载(切换)母版页
- Ubuntu系统启动过程详解
- Oracle中rownum的使用
- 99.99%的人没看懂《蜗居》画龙点睛的一笔:马克(转载)
- AVG
- TableView的使用
- 开博了!
- oracle客户端连接 ORA-06413 连接未打开错误