Giter VIP home page Giter VIP logo

c_multithread_server's Introduction

unix/linux 환경에서 실행해주세요.

컴파일

gcc -pthread -lnsl -lsocket -o server server.c

실행

./server

접속

브라우저에, 서버가 실행되고 있는 컴퓨터의 ip 주소를 입력하고 포트 8888을 입력합니다.

예시:

http://117.17.198.42:8888/
  1. http://117.17.198.42:8888/ 로 접속하면 바로 접속되며 index.html이 보여집니다.

  2. http://117.17.198.42:8888/sleep 로 접속하면 5초 기다렸다가 접속되며 sleep.html이 보여집니다.

  3. 멀티 쓰레딩이 되는지 확인하려면, 먼저 sleep으로 접속하고 다른 탭/창에서 루트로 접속하면 문제없이 접속되는 것을 볼 수 있습니다.

c_multithread_server's People

Contributors

istiopaxx avatar

Stargazers

Roman avatar

Watchers

 avatar

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.