Paste: linux sockets build error

Author: kssreeram
Mode: text
Date: Thu, 30 Sep 2010 12:02:30
Plain Text |
###############################
overload makeSockaddr(inet: Inet) sin: Sockaddr_in {
    memset(RawPointer(&sin), 0, TypeSize(Sockaddr_in));
    sin.sin_family <-- AF_INET;
----^
    sin.sin_port <-- htons(inet.port);
    sin.sin_addr <-- inet.host;
###############################
/home/ks/code/clay/build/compiler/src/../../../lib-clay/io/sockets/sockets.clay(97,4): error: argument 1: expected UInt16 type, but received UInt8 type

compilation context: 
  makeSockaddr(Inet)
  makeSockaddrParams(Inet)
  ListenSocket(Inet, Int32)
  ListenSocket(Inet)
  server(Vector[Vector[Char]])
  invokeCommand(Static[server], Vector[Vector[Char]])
  call(LambdaObject2, Vector[Char])
  maybeValue(Vector[Char], LambdaObject2, Static[LambdaProcedure])
  maybeValue(Maybe[Vector[Char]], LambdaObject2, Static[LambdaProcedure])
  maybe(Maybe[Vector[Char]], LambdaObject2, Static[LambdaProcedure])
  dispatchMain(Static[server], Static[client])
  main()
  getExitCode(Int32)
  callMain(Static[main])

New Annotation

Summary:
Author:
Mode:
Body: