客户端
ClientTest类:负责和服务器进行通信,建立两个线程,分别发送和接收客户端发出的命令和接收服务器端发出的命令。
ClientTest3.java
package game;
import java.io.*;
import java.net.*;
public class ClientTest3{
public stat...
分类:
其他好文 时间:
2014-12-09 21:31:06
阅读次数:
140
最近在看 Linux 程序设计,准备写成一个系列。把每天学到的记录下来。 以实际的例子为主。
一、条件语句
if 语句
语法
#用法 1 if condition1then statementelif condition2then statementfi#用法 2 if condition1; then statementelif condition2; then stat...
分类:
系统相关 时间:
2014-12-08 21:25:16
阅读次数:
225
与网络打交道在GS,GC,Share都与网络打交道,但还是GC最多GC打交道过程send_stat BaseChannel::SendCmdTry(){ if (!m_queCmd.size()) return send_stat::send_succeed; for(;;...
分类:
其他好文 时间:
2014-12-07 14:57:33
阅读次数:
154
GS与数据库打交道link_stat stat = (link_stat)rPkt.size;if (stat == link_stat::link_connected){ GameChannel* pNewGC = new GameChannel(); pNewGC->m...
分类:
数据库 时间:
2014-12-07 00:00:27
阅读次数:
476
1 try { 2 boolean auto = conn.getAutoCommit(); 3 conn.setAutoCommit(false); 4 5 Statement stat =...
分类:
数据库 时间:
2014-12-06 19:25:16
阅读次数:
270
mpstat(Multiprocessor Statistics)是实时系统监控工具。报告与CPU的一些统计信息,这些信息存放在/proc/stat文件中。在多CPUs系统里,不但能查看所有CPU的平均状况信息,而且能够查看特定CPU的信息。mpstat最大的特点是:可以查看多核心cpu中每个计.....
分类:
其他好文 时间:
2014-12-06 12:41:56
阅读次数:
216
GS给客户单发包以及m_queGcWait(所有GC共享)send_stat BaseChannel::SendCmd(int nCmd, void* pData, int nLen){ Protocol Ptl; Ptl.cmd_type = nCmd; Ptl.conte...
分类:
其他好文 时间:
2014-12-05 22:40:06
阅读次数:
133
参考在网上找到的代码,没想到相差那么大,目前有个项目要对50GB~70GB的代码,260个关键字做扫描,急需一个比较快速的方案。 [gzhy@nearby stat]$ wc -l 1
234033 1
[gzhy@nearby stat]$ perl 1.pl
cost 1 seco...
分类:
系统相关 时间:
2014-12-04 23:23:38
阅读次数:
547
在linux系统下安装软件或复制文件的时候,复制不成功,出现错误如下:error: failed to stat /home/dade/.gvfs: Permission denied.表面上看:好像是权限不够,于是准备使用chmod -R 777 .gvfs 修改权限,可让你惊讶的是,root用户...
分类:
其他好文 时间:
2014-12-04 17:11:45
阅读次数:
263
1 sys/stat头文件中定义了stat、fstat、lstat函数2 struct stat 结构struct stat{ mode_t st_mode; ino_t st_ino; dev_t ...
分类:
其他好文 时间:
2014-12-03 18:42:16
阅读次数:
146