Program Main
Use ws2_32
use SocketClass
implicit none
type(TCP_Socket) :: conn
character(len=15) :: IP
integer :: j
IP = "127.0.0.1"
j = Socket_Init()
j = conn%Conn( SOCK_STREAM , IPPROTO_TCP , IP , 4488 )
write(*,*) j
j = conn%Send("Hello",5)
write(*,*) j
j = conn%DisConn()
call Socket_UnInit()
End Program Main
7.74 KB, 下载次数: 12
vvt 发表于 2021-3-31 19:22
Fortran语法里没有这些内容,就像C语言,C++语言也没有这些内容一样。
我也不是很推荐用 Fortran 来完成这 ...
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |