go使用TCP连接服务端错误

栏目: 服务器 · 发布时间: 6年前

自己写了一个跑在 Linux 服务端的 go 程序,从客户端连接时提示:No connection could be made because the target machine actively refused it.

然后关闭防火墙该,双向ping都能同,依然心灰意冷。但作为程序小白,百度了很多都无用,看了go的文档,在示例显示监听端口的代码net.Listen("tcp", ":8080"),我以前的监听代码net.Listen("tcp", "127.0.0.1:8081"),我把IP去掉换成了现在这个代码net.Listen("tcp", ":8081"),居然能通了。。。。。。。此处省略无数的。。。。。,这证明得多多学习


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Pro CSS and HTML Design Patterns

Pro CSS and HTML Design Patterns

Michael Bowers / Apress / April 23, 2007 / $44.99

Design patterns have been used with great success in software programming. They improve productivity, creativity, and efficiency in web design and development, and they reduce code bloat and complexit......一起来看看 《Pro CSS and HTML Design Patterns》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

html转js在线工具
html转js在线工具

html转js在线工具