---
namespace: Titanium.Network.HTTPServer.bind
type: method
description: bind this server to a port on a specific interface
since: 0.3.0
platforms: [osx, linux, win32]
returns: String
parameters: 
    - [Number, port, port to bind on]
    - [String, address, (optional) address to bind to]
    - [Method, callback, callback for server logic (in seperate thread)]

---
namespace: Titanium.Network.HTTPServer.bind
type: method
description: bind this server to a port on a specific interface
since: 0.3.0
platforms: [osx, linux, win32]
returns: String
parameters: 
    - [Number, port, port to bind on]
    - [String, address, (optional) address to bind to]
    - [Method, callback, callback for server logic (in seperate thread)]
examples:
    - description: Simple HTTP server
      code: |
            <pre><code>
                // Create a HTTP server that listens on port 8080
                var httpServer = Titanium.Network.createHTTPServer();
                httpServer.bind(8080, function(request, response)
                {
                    Titanium.API.debug("Got request for URI: " + request.getURI());
                    response.setContentType("text/html");
                    response.write("<h1>Hello!</h1>");
                });
            </code></pre>

Add a simple HTTP server example to API docs.
Add a simple HTTP server example to API docs.
