This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pineoc, 2015-04-27 | |
week 9 network programming | |
multiThread echo server | |
server code | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pineoc, 2015-05-04 | |
week 10 network programming | |
multiThread chatting | |
client code | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pineoc, 2015-05-04 | |
week 10 network programming | |
multiThread recv send routine divide | |
client code | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pineoc, 2015-05-18 | |
week 12 network programming | |
select echo server | |
server code | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
pineoc, 2015-06-01 | |
week 14 network programming | |
select server | |
server code | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define TIMETEST 0 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#if (TIMETEST) | |
#include <chrono>//for time check | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define TIMETEST 0 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#include <math.h> | |
#if (TIMETEST) | |
#include <chrono>//for time check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define TIMETEST 0 | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
#if (TIMETEST) | |
#include <chrono>//for time check | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var session = require('express-session'); | |
var parseurl = require('parseurl'); | |
var routes = require('./routes/index'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'); | |
var router = express.Router(); | |
/* GET home page. */ | |
router.get('/', function(req, res, next) { | |
res.render('index', { title: 'Express' }); | |
}); | |
router.get('/sock',function(req,res,next){ | |
res.render('sockTest',{title:'socket Test'}) |