您的位置:首页 > 其它

[学习总结]5.25—5.31

2015-06-01 11:05 183 查看

outline

线程

I/O多路转接

文件描述符的传送

网络编程

内存学习

线程

基本函数:

pthread_create()

pthread_exit()

pthred_join()

pthread_cleanup_push()

pthread_cleanup_pop()

线程的互斥:互斥锁 mutex

pthread_mutex_init()

pthread_mutex_destroy()

pthread_mutex_lock()

pthread_mutex_unlock()

pthread_mutex_trylock()

线程的同步:条件变量 cond

pthread_cond_inti()

pthread_cond_wait() pthread_cond_timedwait()

pthread_cond_signal() pthread_cond_broadcast()

I/O多路转接

select()

poll()

epoll:

epoll_create()

epoll_ctl()

epoll_wait()

ET模式

文件描述符的传递

socketpair()

sendmsg() recvmsg()

writev() readv()

网络编程 socket

网络模型:

TCP/IP 四层模型

网络字节序转换:

htons() htonl() ntohs() ntohl()

域名地址转换:

inet_addr() inet_aton() inet_ntoa()

获得网络主机信息:

gethostbyname()

gethostbyaddr()

TCP通信:

server : socket->bind->listen->accept->recv->send->close

client : socket->connect->recv->send->close

练习:

-多客户端的c/s模型:多进程实现,多线程实现

-非阻塞形式的c/s模型:fcntl() select() epoll()

内存学习

菜鸟成长手册:详解内存工作原理及发展历程

http://tech.sina.com.cn/h/2006-12-07/0520181744.shtml
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: