主题:求一个linux示例程序
narsh
[专家分:790] 发布于 2006-04-20 15:23:00
哪一位可以共享一个在linux下实现文件传输的程序?用套接字实现两台Pc的文件传输。我在入门里用困难,都焦头烂额了[em10]
回复列表 (共2个回复)
沙发
justforfun626 [专家分:18460] 发布于 2006-04-20 22:50:00
If you use Java, it is easy.
Modify this following example to transfer your file. Remember, file is just a stream of bytes.
[url]http://java.sun.com/docs/books/tutorial/networking/sockets/readingWriting.html[/url]
You can do a google search on "c/c++ socket linux example", you will find some ready to use code too.
They are harder to read, but do the similar things.
Don't wait for someone to give you answers, go out to find your own answers.
I am working on Java-c++ inter process communication on linux right now, the above is exactly what I was doing.
Thanks!
板凳
cmaster [专家分:9520] 发布于 2006-05-02 21:00:00
给你推荐一本书吧,UNIX网络编程。
我来回复