Code Monkey home page Code Monkey logo

Comments (7)

starwing avatar starwing commented on August 21, 2024

话是这么说= =不过,是期望在znet类型隔离的,那传啥好呢= =void*的buf么= =

from znet.

ownwaterloo avatar ownwaterloo commented on August 21, 2024

支持ipv6吗。。。 我看目前是没这打算。。。 那么socket和WSASocket的参数是死的。。。 就connect需要addr)或者再加一个len)。
socket addr这块丑得一逼, 不知道当初那些人是怎么想的, 每次都要cast一下。。。 感觉并没有什么乱用。。。
不如直接用const void*免得让用户再cast了。

from znet.

starwing avatar starwing commented on August 21, 2024

getaddrinfo有,不过最小系统依赖是Vista或者Win8.1

from znet.

starwing avatar starwing commented on August 21, 2024

另外,貌似这个函数会阻塞啊= =

from znet.

ownwaterloo avatar ownwaterloo commented on August 21, 2024

windows简直水深火热-_-

hints.ai_flags |= AI_NUMERICHOST;
getaddrinfo(node, service, &hints, &res);

If hints.ai_flags contains the AI_NUMERICHOST flag then node must be a numerical network address. The AI_NUMERICHOST flag suppresses any potentially lengthy network host address lookups.

为什么是vista(这是win6吧)和win8.1? win7怎么跳过了。。。

inet_pton/inetPton,inet_aton呢? 它们至少会检查(很可能来自用户的)输入。。。

from znet.

starwing avatar starwing commented on August 21, 2024

InetPton 同样是8.1才有= =

from znet.

starwing avatar starwing commented on August 21, 2024

我自己实现了一个pton和ntop,这个问题已经解决掉了

from znet.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.