资源:动态分配的内存、文件描述器、互斥锁、图形界面中的字型与笔刷、数据库连接以及网络sockets等,无论哪一种资源,重要的是,当你不再使用它时,必须将它还给系统。条款13:以对象管理资源当我们向系统申请资源后,一定要记得释放,不然就容易发生内存泄漏。但是意识到这样一件事并不是很容易,比如我们是通过...
分类:
编程语言 时间:
2015-11-22 17:27:26
阅读次数:
162
知识点:l 认识sockets(套接字)l 加载套接字库l 绑定端口l 监听l 收发信息l 关闭套接字一、认识sockets(套接字) Sockets是一个Windows网络编程的规范,sockets(套接字)编程有三种:1、流式套接字(SOCK_STREAM)2、数据报套接字(SOCK_DGRAM...
分类:
其他好文 时间:
2015-11-21 19:46:23
阅读次数:
129
首先创建一个服务器using UnityEngine;using System.Collections;using System.Net.Sockets;using System.Net;using System.Threading; //引入线程的包public class ServerSocke...
分类:
编程语言 时间:
2015-11-16 22:34:58
阅读次数:
186
1. CPU time正常情况,在等待事件中排首位NUM_CPU_SOCKETS 物理CPU的数目NUM_CPU_CORES CPU的核数NUM_CPUS 逻辑CPU的数目2. Buffer busy waits (Buffer busy wait / read by other session)一...
分类:
数据库 时间:
2015-11-13 22:07:22
阅读次数:
378
1、nginx 配置文件 ????1.1、项目目录放在系统/var/www/ upstream?app?{
#?Path?to?Unicorn?SOCK?file,?as?defined?previously
server?unix:/var/www/app/shared/sockets/unicorn.sock?fail_ti...
分类:
系统相关 时间:
2015-11-13 13:20:45
阅读次数:
402
核心代码:usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Net;
usingSystem.Net.Sockets;
usingSystem.Runtime.InteropServices;
usingSystem.Text;
usingSystem.Threading.Tasks;
namespaceTestServerTime
{
publicclassServerInfo
{
publics..
2009-02-02 17:488226人阅读评论(2)收藏举报服务器internetc#socketstringwindows需要用到的名空间[c-sharp]view plaincopyusingSystem.Net;usingSystem.Net.Sockets;usingSystem.Run...
1、修改php.ini,打开extension=php_sockets.dll2、服务端程序SocketServer.php3、客户端程序SocketClient.php4、测试 运行服务端程序:C:\wamp\bin\php\php5.4.16\php.exe C:\wamp\www\Sock.....
分类:
Web程序 时间:
2015-11-06 16:17:04
阅读次数:
198
using System;using System.Collections.Generic;using System.Text;using System.Net.Sockets;using System.Threading;using System.Windows;using System.IO;n...
分类:
其他好文 时间:
2015-11-06 13:06:21
阅读次数:
238
TCP Sockets基础 Sockets,是用户程序与TCP/IP协议的中介。 实现TCP Sockets通信,需要本地IP和端口,对方IP和端口。客户端发通信请求,发送或接收流,关闭流和Sockets,服务端需要实时监听通信端口,接受通信请求,接受或输出流。 InetAddress类,代表...
分类:
编程语言 时间:
2015-11-02 21:15:33
阅读次数:
209