1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090 |
- <h1>GoAhead Native API</h1>
- <a name="Extensions"></a><h1>Extensions</h1>
- <table class="apiIndex" title="Extensions">
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs" class="nameRef">Webs</a></td>
- <td class="apiBrief">GoAhead request structure.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_auth" class="nameRef">WebsAuth</a></td>
- <td class="apiBrief">GoAhead Authentication.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_buf" class="nameRef">WebsBuf</a></td>
- <td class="apiBrief">A WebsBuf (ring queue) allows maximum utilization of memory for data storage and is ideal for input/output buffering.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_hash" class="nameRef">WebsHash</a></td>
- <td class="apiBrief">Hash table entry structure.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_route" class="nameRef">WebsRoute</a></td>
- <td class="apiBrief">Request route structure.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_runtime" class="nameRef">WebsRuntime</a></td>
- <td class="apiBrief">GoAhead Web Server Runtime.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_session" class="nameRef">WebsSession</a></td>
- <td class="apiBrief">Session state storage.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_socket" class="nameRef">WebsSocket</a></td>
- <td class="apiBrief">Socket control structure.</td></tr>
- <tr class="apiDef">
- <td class="apiName"><a href="#group___webs_upload" class="nameRef">WebsUpload</a></td>
- <td class="apiBrief">File upload structure.</td></tr>
- </table>
- <a name="Functions"></a><h1>Functions</h1>
- <table class="apiIndex" title="Functions">
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a80adc8087f3a20a2669565b281d57a38" class="nameRef">assert</a>(<a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)</td></tr><tr class="apiBrief"><td> </td><td>Assure that an assert condition is true.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga1838678c03f471aed89edfa5db822272" class="nameRef">bufAddNull</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Add a trailing null to the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga7fb267b66c30173cf035560028e83eba" class="nameRef">bufAdjustEnd</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Adjust the endp pointer by the specified size.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga89be85c8255bbe0b7a414af5f1587600" class="nameRef">bufAdjustStart</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td> </td><td>Adjust the start (servp) reference.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1ga9ffe6a1664c7911d12e01f317fc18458" class="nameRef">bufCompact</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Compact the data in the buffer and move to the start of the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1ga5acfca7bd6b154817530a4551de9a4a6" class="nameRef">bufCreate</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, int increment, int maxsize)</td></tr><tr class="apiBrief"><td> </td><td>Create a buffer.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gaf5a93373e65f8a7ccb456eb4bf72bba8" class="nameRef">bufFlush</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Flush all data in the buffer and reset the pointers.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gacda55401603f555af52faee39639d78c" class="nameRef">bufFree</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Free allocated storage for the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gaa3a7777b78cd891c746772b5c489fd99" class="nameRef">bufGetBlk</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Copy a block of from the buffer and adjust the servp.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gafa8400821880a8f4d9f1cad4a9595626" class="nameRef">bufGetBlkMax</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Return the maximum number of bytes the buffer can provide via a single block copy.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1gaad216addfbff3e9ecacdf4f4a651ac90" class="nameRef">bufGetc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Get a character from the buffer and increment the servp.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_buf_1ga48fc76d92c206efcfdf3a376f85214dd" class="nameRef">bufGrow</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> room)</td></tr><tr class="apiBrief"><td> </td><td>Grow the buffer by at least the required amount of room.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1gaa0ae470cc24e8e57db77e42ffb751b83" class="nameRef">bufInsertc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)</td></tr><tr class="apiBrief"><td> </td><td>Insert a character to the buffer before the servp position and decrement the servp.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga284f3c18de56b775c0a13f58f78d4744" class="nameRef">bufLen</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Get the length of available data in the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga31ab202e1cef11fa44e7232100fc500f" class="nameRef">bufPut</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...) PRINTF_ATTRIBUTE(2</td></tr><tr class="apiBrief"><td> </td><td>Append a formatted string to the buffer at the endp position and increment the endp.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1gad14675b48245dc6eaabd6e6da8686a73" class="nameRef">bufPutBlk</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Put a block to the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize</td><td><a href="#group___webs_buf_1gaea6647f6507f65ea81faf7c47e8703e1" class="nameRef">bufPutStr</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Append a string to the buffer at the endp position and increment the endp.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_buf_1ga7c38d63ce718b544ebdb32807a34ca3e" class="nameRef">bufPutc</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)</td></tr><tr class="apiBrief"><td> </td><td>Append a character to the buffer at the endp position and increment the endp.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_buf_1gaa1f359ca367a6f72ebaa4b4028732333" class="nameRef">bufReset</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Reset the buffer pointers to the start of the buffer if empty.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_buf_1ga2ffac4a06b33a774a59e0441bbf0a555" class="nameRef">bufRoom</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Determine the room available in the buffer.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_buf_1ga62f58e280d1d6706e8eb0637963f658e" class="nameRef">bufStart</a>(<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)</td></tr><tr class="apiBrief"><td> </td><td>Get a reference to the start of buffer data.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a03544bf56dde3a257391d07e1d6f6a3a" class="nameRef">error</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Emit an error message.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="nameRef">fmt</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)</td></tr><tr class="apiBrief"><td> </td><td>Format a string into a static buffer.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="nameRef">hashCreate</a>(int size)</td></tr><tr class="apiBrief"><td> </td><td>Create a hash table.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="nameRef">hashDelete</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Delete a key by name.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="nameRef">hashEnter</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#struct_webs_value" class="ref">WebsValue</a> value, int arg)</td></tr><tr class="apiBrief"><td> </td><td>Enter a new key and value into the hash table.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="nameRef">hashFirst</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id)</td></tr><tr class="apiBrief"><td> </td><td>Start walking the hash keys by returning the first key entry in the hash.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="nameRef">hashFree</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id)</td></tr><tr class="apiBrief"><td> </td><td>Free a hash table.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="nameRef">hashLookup</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Lookup a name in the hash table.</td></tr>
- <tr class="apiDef"><td class="apiType">void*</td><td><a href="#group___webs_hash_1ga1ca237f892334fd5a59387dc0c230f0d" class="nameRef">hashLookupSymbol</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> sd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Lookup a name in the hash table and return a symbol reference.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="nameRef">hashNext</a>(<a href="#group___webs_hash" class="ref">WebsHash</a> id, <a href="#struct_webs_key" class="ref">WebsKey</a> *last)</td></tr><tr class="apiBrief"><td> </td><td>Continue walking the hash keys by returning the next key entry in the hash.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a></td><td><a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="nameRef">hextoi</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Convert a hex string to an integer.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="nameRef">itosbuf</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)</td></tr><tr class="apiBrief"><td> </td><td>Convert an integer to a string buffer.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a95bd348305d4a3044216ec4d694cd1d4" class="nameRef">logClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the log logging module.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a></td><td><a href="#goahead_8h_1af07cb7c6e3a418059b33eb2243e0e945" class="nameRef">logGetHandler</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the log callback.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a2c0c1dd956ebfaf981553f5a99cd7bb7" class="nameRef">logOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the log logging module.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a></td><td><a href="#goahead_8h_1a69d48d711cafc09c257c41705b29eb6a" class="nameRef">logSetHandler</a>(<a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a> handler)</td></tr><tr class="apiBrief"><td> </td><td>Set a log callback.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a973f65430b9ee826c6906891d2173bd3" class="nameRef">logSetPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td> </td><td>Set the filename to save logging output.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a02f3703e8699520d66c2477e225af267" class="nameRef">logmsgProc</a>(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Emit a message to the log.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="nameRef">scaselesscmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings ignoring case.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="nameRef">scaselessmatch</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings ignoring case.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="nameRef">sclone</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Clone a string.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="nameRef">scmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="nameRef">scopy</a>(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)</td></tr><tr class="apiBrief"><td> </td><td>Copy a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="nameRef">sfmt</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)</td></tr><tr class="apiBrief"><td> </td><td>Format a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="nameRef">sfmtv</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, va_list args)</td></tr><tr class="apiBrief"><td> </td><td>Format a string with varargs.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="nameRef">slen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Return the length of a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="nameRef">slower</a>(char *str)</td></tr><tr class="apiBrief"><td> </td><td>Convert a string to lower case.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="nameRef">smatch</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="nameRef">sncaselesscmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings ignoring case.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gafc391546b97fb1fefb3dd78a96acb1b4" class="nameRef">snclone</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Clone a substring.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="nameRef">sncmp</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Compare strings.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="nameRef">sncopy</a>(char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)</td></tr><tr class="apiBrief"><td> </td><td>Copy characters from a string.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="nameRef">socketAddress</a>(struct sockaddr *addr, int addrlen, char *ipbuf, int ipLen, int *port)</td></tr><tr class="apiBrief"><td> </td><td>Extract the numerical IP address and port for the given socket info.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="nameRef">socketAddressIsV6</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)</td></tr><tr class="apiBrief"><td> </td><td>Determine if an IP address is an IPv6 address.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="nameRef">socketAlloc</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92" class="ref">SocketAccept</a> accept, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Allocate a socket object.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="nameRef">socketClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the socket module.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="nameRef">socketCloseConnection</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Close a socket connection.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gada07f74963867ae158f0289c8483f846" class="nameRef">socketConnect</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Connect to a server and create a new socket.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="nameRef">socketCreateHandler</a>(int sid, int mask, <a href="#group___webs_socket_1ga657e287f5f61294f65c3092a0e0b5e18" class="ref">SocketHandler</a> handler, void *arg)</td></tr><tr class="apiBrief"><td> </td><td>Create a socket handler that will be invoked when I/O events occur.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga8844ac81357964309fd7e9f872ad1bd7" class="nameRef">socketDeleteHandler</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Delete a socket handler created via socketCreateHandler.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="nameRef">socketEof</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Determine if the socket is at end-of-file for input.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="nameRef">socketFree</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Free (and close) the socket.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="nameRef">socketGetBlock</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Get the current blocking mode.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="nameRef">socketGetError</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Get the error code for the last socket operation on this thread.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a></td><td><a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="nameRef">socketGetHandle</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Get the underlying socket operating system socket/file handle.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_socket" class="ref">WebsSocket**</a></td><td><a href="#group___webs_socket_1gac772288c5a34e90adb7e3c0edd372576" class="nameRef">socketGetList</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the list of sockets.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="nameRef">socketGetPort</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Get the IP port associated with this socket.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1gae6ec811c6a5800916ac00db2c7c9fb30" class="nameRef">socketHasDualNetworkStack</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Indicate if the system has a dual IPv4 and IPv6 stack.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga764eb6101ccc3ba01f775436432cfd48" class="nameRef">socketHasIPv6</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Indicate if the system has IPv6 support.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga22d77c01e3349be30f4a24e790b72499" class="nameRef">socketHiddenData</a>(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)</td></tr><tr class="apiBrief"><td> </td><td>Indicate that the application layer has buffered data for the socket.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="nameRef">socketInfo</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr_storage *addr, <a href="#goahead_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)</td></tr><tr class="apiBrief"><td> </td><td>Get a socket address structure for the specified IP:Port.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="nameRef">socketIsV6</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Determine if a socket is bound to an IPv6 address.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="nameRef">socketListen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92" class="ref">SocketAccept</a> accept, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Open a listening socket.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="nameRef">socketOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the socket module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="nameRef">socketParseAddress</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipAddrPort, char **pip, int *pport, int *secure, int defaultPort)</td></tr><tr class="apiBrief"><td> </td><td>Parse an IP address into its constituent parts.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="nameRef">socketProcess</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Process pending socket I/O events.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_socket" class="ref">WebsSocket*</a></td><td><a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="nameRef">socketPtr</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Return the socket object for the socket ID.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="nameRef">socketRead</a>(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Read data from a socket.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="nameRef">socketRegisterInterest</a>(int sid, int mask)</td></tr><tr class="apiBrief"><td> </td><td>Register interest in socket I/OEvents.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="nameRef">socketReservice</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Request that the socket be reserviced.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="nameRef">socketSelect</a>(int sid, int timeout)</td></tr><tr class="apiBrief"><td> </td><td>Wait for I/O on a socket.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="nameRef">socketSetBlock</a>(int sid, int on)</td></tr><tr class="apiBrief"><td> </td><td>Set the socket blocking mode.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="nameRef">socketSetError</a>(int error)</td></tr><tr class="apiBrief"><td> </td><td>Set the error code for the last socket operation on this thread.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1ga172c24a34fcdff1a79fdde165738e07c" class="nameRef">socketSetNoDelay</a>(int sid, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)</td></tr><tr class="apiBrief"><td> </td><td>Set the socket delay mode.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="nameRef">socketWaitForEvent</a>(<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, int mask)</td></tr><tr class="apiBrief"><td> </td><td>Wait for a socket I/O event.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="nameRef">socketWrite</a>(int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Write data to the socket.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7e6149e63a2f4ad6fc53ac6ac60cec1a" class="nameRef">sslClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the ssl module.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaeebef5121f49387a67fc33de42aefffe" class="nameRef">sslFree</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Free a ssl connection associated with a request.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga81e8547c8bf48f6b74e0ea2fab0a296c" class="nameRef">sslOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the ssl module.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga8063a955fe7c9d4f3f1ccb036d186835" class="nameRef">sslRead</a>(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Read data from a secure socket.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0ceefc6dfb2a71dec6c5a18b37097c64" class="nameRef">sslUpgrade</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Upgrade a request connection to utilize SSL.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gaf190d807759ac01cad747d013b1893cf" class="nameRef">sslWrite</a>(<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>WRite data to a secure socket.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga3749b26084eb67b7f76bb7aa48c839d5" class="nameRef">ssplit</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td> </td><td>Split a string at a delimiter.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#goahead_8h_1a5eec22bfd3a58a8c344d30175849f2ee" class="nameRef">sstarts</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td> </td><td>Test if the string starts with a given pattern.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="nameRef">stok</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)</td></tr><tr class="apiBrief"><td> </td><td>Tokenize a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="nameRef">strim</a>(char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)</td></tr><tr class="apiBrief"><td> </td><td>Trim a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="nameRef">supper</a>(char *str)</td></tr><tr class="apiBrief"><td> </td><td>Convert a string to upper case.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a377d5247f829befd58214234183e84ee" class="nameRef">traceProc</a>(int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Emit a debug trace message to the log.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ac5058870cad6692d50f7fa9775a56c25" class="nameRef">valueFree</a>(<a href="#struct_webs_value" class="ref">WebsValue</a> *value)</td></tr><tr class="apiBrief"><td> </td><td>Free any allocated string in a value.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1aa27f5beea810d9124985ecf1c1fe41fa" class="nameRef">valueInteger</a>(long value)</td></tr><tr class="apiBrief"><td> </td><td>Create an integer value.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1adb8296687c9b528cfa0d9deb2eb42cf0" class="nameRef">valueString</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Create an string value.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_value" class="ref">WebsValue</a></td><td><a href="#goahead_8h_1aa9292efb92931035fbdb7e8cc9fc2a58" class="nameRef">valueSymbol</a>(void *value)</td></tr><tr class="apiBrief"><td> </td><td>Create an symbol value containing an object reference.</td></tr>
- <tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a8fcf6c446be29f4fa9e558cef4f62428" class="nameRef">walloc</a>(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Allocate a block of the requested size.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="nameRef">wallocHandle</a>(void *map)</td></tr><tr class="apiBrief"><td> </td><td>Allocate a handle from a map.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="nameRef">wallocObject</a>(void *map, int *max, int size)</td></tr><tr class="apiBrief"><td> </td><td>Allocate an object in a halloc map.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ab07b7c0b89520599c586358086c52568" class="nameRef">wcloseAlloc</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the GoAhead memory allocator.</td></tr>
- <tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a1a8530408eb04ac2cfe964c0be322e7d" class="nameRef">wdup</a>(<a href="osdep.html#osdep_8h_1a5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, size_t usize)</td></tr><tr class="apiBrief"><td> </td><td>Duplicate memory.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0a02508940140401b730219dba7295d5" class="nameRef">websAccept</a>(int sid, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr, int port, int listenSid)</td></tr><tr class="apiBrief"><td> </td><td>Accept a new connection.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf903a6d7928616f803d294de73f8cd11" class="nameRef">websActionOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the action handler.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_role" class="ref">WebsRole*</a></td><td><a href="#group___webs_auth_1ga637ac17c1c1d24cafa5589b00e4ef82b" class="nameRef">websAddRole</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role, <a href="#group___webs_hash" class="ref">WebsHash</a> abilities)</td></tr><tr class="apiBrief"><td> </td><td>Add a role.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_route" class="ref">WebsRoute*</a></td><td><a href="#group___webs_route_1ga591531eedbacb9dbe29c0461ebbdd9eb" class="nameRef">websAddRoute</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *handler, int pos)</td></tr><tr class="apiBrief"><td> </td><td>Add a route to the routing tables.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_user" class="ref">WebsUser*</a></td><td><a href="#group___webs_auth_1ga9aa0a184957878bff4eeaddc8774c96a" class="nameRef">websAddUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)</td></tr><tr class="apiBrief"><td> </td><td>Add a user.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga069bb8b6d336ca5f8ea2f3b8c113371b" class="nameRef">websAlloc</a>(int sid)</td></tr><tr class="apiBrief"><td> </td><td>Allocate a new Webs object.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1ga960eb7ffd15820d3305445b257462b9d" class="nameRef">websAllocSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *id, int lifespan)</td></tr><tr class="apiBrief"><td> </td><td>Test if a user possesses the required ability.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga2e7099150ce40f126e53901b37055164" class="nameRef">websAuthenticate</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Authenticate a user.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga4b9213d33c030e357c81a97765a83ab3" class="nameRef">websCan</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#group___webs_hash" class="ref">WebsHash</a> ability)</td></tr><tr class="apiBrief"><td> </td><td>Test if a user possesses the required ability.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gad02e7e70e4f3b7bca1ee2a318a336e80" class="nameRef">websCancelTimeout</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Cancel the request timeout.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac05856f3dd04aeef0732570bedf044ad" class="nameRef">websCgiHandler</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>CGI handler service callback.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae908f662db14b2f0571634f48dda790c" class="nameRef">websCgiOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the CGI handler.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac14f9e9acabae760c4225c6a372747a5" class="nameRef">websCgiPoll</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Poll for output from CGI processes and output.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#goahead_8h_1a93ffe2fd6f833e223e48dac77c650daa" class="nameRef">websCheckPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)</td></tr><tr class="apiBrief"><td> </td><td>Check a plain-text password against the defined hashed password.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga94471225b733c21ebe13449aed71cf98" class="nameRef">websClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the core GoAhead web server module.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1gafd247c60a4a156f514fae54aba5c95af" class="nameRef">websCloseAuth</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the authentication module.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac3d3297f51f566d7dcd0c1003180f210" class="nameRef">websCloseFile</a>(int fd)</td></tr><tr class="apiBrief"><td> </td><td>Close an open file.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_route_1ga712fb5968ea34647fbd198b281576b4e" class="nameRef">websCloseRoute</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the route module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2ebc310e8ccbfd0e52a29d5f8d192b13" class="nameRef">websCompareVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *var, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td> </td><td>Compare a request variable.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1ga4d6532cddbf3407711d240f6d2591bc9" class="nameRef">websComputeAllUserAbilities</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Compute the abilities for all users by resolving roles into abilities.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga6e0b2ea7b62d847fd10d7bb761d1189e" class="nameRef">websConsumeInput</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> nbytes)</td></tr><tr class="apiBrief"><td> </td><td>Consume input from the request input buffer.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1ga69bb1da9a9f13651d5a6db9379cb37e9" class="nameRef">websCreateSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Test if a user possesses the required ability.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1afd405fa10ef57a17f18b099e7cee1ee2" class="nameRef">websCryptPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)</td></tr><tr class="apiBrief"><td> </td><td>Encrypt a password using the Blowfish algorithm.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga762ed53bab0974c82bfa0fdcef22580d" class="nameRef">websDecode64</a>(char *str)</td></tr><tr class="apiBrief"><td> </td><td>Decode the string using base-64 encoding.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga3b21883f613ad05e48a9de43714bf67e" class="nameRef">websDecode64Block</a>(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Decode a block using base-46 encoding.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gab121f04477c839b0750fb24db5f25d8b" class="nameRef">websDecodeUrl</a>(char *decoded, char *input, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Decode a URL expanding NN encoding.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga16df3436fa7bff9179b1d278c24beef5" class="nameRef">websDefineAction</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *fun)</td></tr><tr class="apiBrief"><td> </td><td>Define an action callback for use with the action handler.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gabfae07af8717f3e8080cc4738db4ae1e" class="nameRef">websDefineHandler</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442" class="ref">WebsHandlerProc</a> match, <a href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442" class="ref">WebsHandlerProc</a> service, <a href="#group___webs_1gaaf026187015f50b6c6068f996cad29fc" class="ref">WebsHandlerClose</a> close, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Define a request handler.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga7f4aa0888bf456eab90a010bcbcdb770" class="nameRef">websDefineJst</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga95d129571903557ca1817968430bafd9" class="ref">WebsJstProc</a> fn)</td></tr><tr class="apiBrief"><td> </td><td>Define a Javscript native function.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_session_1ga8f9464efab7e9045cab72863ccdb81db" class="nameRef">websDestroySession</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Destroy the webs session object.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac2af58b7a686cb33e44eb010cf755ce1" class="nameRef">websDone</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Complete a request.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga97f5bcd7b8aa8df838037f9cf2c55267" class="nameRef">websEncode64</a>(char *str)</td></tr><tr class="apiBrief"><td> </td><td>Encode a string using base-64 encoding.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga01aac3c460b2484e8f26f147e993846e" class="nameRef">websEncode64Block</a>(char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)</td></tr><tr class="apiBrief"><td> </td><td>Encode a block using base-64 encoding.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gac898af1d6d0c6cccb905e6a53479b559" class="nameRef">websError</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int code, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Complete a request with an error response.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga36a32239715d1f4eedff518aa81542ba" class="nameRef">websErrorMsg</a>(int code)</td></tr><tr class="apiBrief"><td> </td><td>Get a message for a HTTP status code.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga22d0cc25b40e3a8039b9c62da85661bd" class="nameRef">websEscapeHtml</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Escape unsafe characters in a string.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf24cee2f9e39e20e09e73067b8b5b072" class="nameRef">websFileOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open and initialize the file handler.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga6525ac98afd32c69fd0a7985c0b87f5f" class="nameRef">websFlush</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)</td></tr><tr class="apiBrief"><td> </td><td>Flush buffered transmit data and compact the transmit buffer to make room for more data.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga34a9c871eaf4cba49ff81174318af979" class="nameRef">websFree</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Free the webs request object.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga54bd8e9073aca8fe5ac527e0b26ae738" class="nameRef">websFreeUpload</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Free file upload data structures.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga3d2d9787c3fd3b4338ae0a6995fbb338" class="nameRef">websFsClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the file system module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga0014f224e979be944998d31c4faad46f" class="nameRef">websFsOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the file system module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4ac722a8a552f9740ad97de6f23891a4" class="nameRef">websGetBackground</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the background execution flag.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga1dd8b54372cecf50a6773639ca10de8b" class="nameRef">websGetCgiCommName</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get a unique temporary filename for CGI communications.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga0c1129a2e6d2ab25749ce6434cf06917" class="nameRef">websGetCookie</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request cookie if supplied.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga8d082538c22928173eaf231eece3c2bb" class="nameRef">websGetDateString</a>(<a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td> </td><td>Get a date as a string.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga9cbfca3c673e58c64325460d6e0c5e74" class="nameRef">websGetDebug</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the debug flag.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga8ee6d14425afb8eefebf5556ee18c8a2" class="nameRef">websGetDir</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the base file directory for a request.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga2996ca4f6fd53f9b968930add8cf037c" class="nameRef">websGetDocuments</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the GoAhead base documents directory.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2666ed7d6a56c3014d5ceb076cff0567" class="nameRef">websGetEof</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request EOF status.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gae8b669809d9cba59ef7b77ec5b754dc0" class="nameRef">websGetExt</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request URI extension.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga1d34d561f81d6f9ad69244a06d6e38cf" class="nameRef">websGetFilename</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request filename.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga3d13a47ed8ee3f9a3126f51ae1b9d620" class="nameRef">websGetHost</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request host.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gabfdcb79258d04eaa6912393d155eab6c" class="nameRef">websGetIfaddr</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request interface address.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga37e0f4bfb4dc0bfaf554863df437ece6" class="nameRef">websGetIndex</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the default index document name.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2746a02538e42a71d4ef272a9971f986" class="nameRef">websGetLogLevel</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the current trace log level.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga899fcb60a5afe215e7c56bc1f3c00961" class="nameRef">websGetMethod</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request method.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaf36ce4de6a4772ed13ef1f6073d9cb7a" class="nameRef">websGetPassword</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request password.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c" class="ref">WebsVerify</a></td><td><a href="#group___webs_auth_1gac59e51db50106639503b066a95258b75" class="nameRef">websGetPasswordStoreVerify</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Set the password store verify callback.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4c8b947cea7d8077f51d023aec7cd603" class="nameRef">websGetPath</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request path.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gaee772cdbaee60ec39567c47e9a83c2c6" class="nameRef">websGetPort</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request TCP/IP port.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaa18fd6e345dee2e99c47f02471978177" class="nameRef">websGetProtocol</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request HTTP protocol.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gafae1ecad7c3b1a2bfe452cbab8025ab1" class="nameRef">websGetQuery</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request query component.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a3bc1b2f042bfc719a05eb1b9adb0776b" class="nameRef">websGetRandomBytes</a>(char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)</td></tr><tr class="apiBrief"><td> </td><td>Get some random data.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_auth_1gac4ce05bc63317ae4689e42b0bba4f6b7" class="nameRef">websGetRoles</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the roles hash.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4968ce8b1e8a6fe330b1bf78bb77e278" class="nameRef">websGetServer</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the server host name.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga999c5adc0501b4c00414caa8baaf6230" class="nameRef">websGetServerAddress</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the server IP address.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gab976a367d9cecfef956869e053328862" class="nameRef">websGetServerAddressUrl</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the server IP address with port number.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1gaf852b66707400fa0cf172a72731893ce" class="nameRef">websGetServerUrl</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the server host name with port number.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_session" class="ref">WebsSession*</a></td><td><a href="#group___webs_session_1gabaceff85a59337282e9807f62aa046a7" class="nameRef">websGetSession</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int create)</td></tr><tr class="apiBrief"><td> </td><td>Get the session state object for the current request.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_session_1gac8c7bf25c2eda7a6a23111f8bff56df7" class="nameRef">websGetSessionID</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the session ID.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_session_1gae766fcda76d2f12f44e21a7ed18ffd55" class="nameRef">websGetSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)</td></tr><tr class="apiBrief"><td> </td><td>Get a session variable.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="nameRef">websGetUpload</a>(struct Webs *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the hash of uploaded files for the request.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga972f7fc60c236c0e4e6ea7e325096b73" class="nameRef">websGetUrl</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request URI.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga78e094c02b19ce4de8d7c8b62f05be18" class="nameRef">websGetUserAgent</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the client User-Agent HTTP header.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga46696bd6220b11d9e7edf516cd17e578" class="nameRef">websGetUsername</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Get the request username.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_hash" class="ref">WebsHash</a></td><td><a href="#group___webs_auth_1gad3d4ca84a25b0efea6d8aca2bf3784d5" class="nameRef">websGetUsers</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Get the users hash.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar*</a></td><td><a href="#group___webs_1ga4cd0530612a92dde9042c030c369e7d8" class="nameRef">websGetVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)</td></tr><tr class="apiBrief"><td> </td><td>Get a request variable.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga75e53757d82543b1b27797967c0aefb6" class="nameRef">websJstOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the Javascript module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga88501f83c58a6ea9dc8fd14974db9130" class="nameRef">websJstWrite</a>(int jid, <a href="#group___webs" class="ref">Webs</a> *wp, int argc, char **argv)</td></tr><tr class="apiBrief"><td> </td><td>Write data to the response.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gaa883a6d5dfe21e9ae5fd6f1bae2b72c9" class="nameRef">websListen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint)</td></tr><tr class="apiBrief"><td> </td><td>Listen on a TCP/IP address endpoint.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga84cade4d96e10f90f48a89403ffe8585" class="nameRef">websLoad</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td> </td><td>Load routing tables from the specified filename.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga0359ac96f9112adc03baa0ed6d4740d6" class="nameRef">websLoginUser</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)</td></tr><tr class="apiBrief"><td> </td><td>Login a user by verifying the login credentials.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga2ce714b242d8f8d184daaa82eadb1aaf" class="nameRef">websLogoutUser</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Logout a user and remove the user login session.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#group___webs_upload" class="ref">WebsUpload*</a></td><td><a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="nameRef">websLookupUpload</a>(struct Webs *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)</td></tr><tr class="apiBrief"><td> </td><td>Open the file upload filter.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_user" class="ref">WebsUser*</a></td><td><a href="#group___webs_auth_1ga3ebda5094fd5aaf033c0a01f666db5e2" class="nameRef">websLookupUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username)</td></tr><tr class="apiBrief"><td> </td><td>Lookup if a user exists.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga24336820ff761ed13dd23341a9b86ed5" class="nameRef">websMD5</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)</td></tr><tr class="apiBrief"><td> </td><td>Get an MD5 digest of a string.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga06c3e0f9f7351e1127d21ff3713df104" class="nameRef">websMD5Block</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td> </td><td>Get an MD5 digest of a block and optionally prepend a prefix.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1a91d31000f4f654a4f0d58acf73dbc169" class="nameRef">websMakePassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)</td></tr><tr class="apiBrief"><td> </td><td>Make a password hash for a plain-text password using the Blowfish algorithm.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1ad9f484cc1aa0aec171b19795a961b618" class="nameRef">websMakeSalt</a>(<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Make salt for adding to a password.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga8f14fc6ef969671a37ed65acc154a57f" class="nameRef">websNormalizeUriPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td> </td><td>Normalize a URI path.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga3b5c4de81f247a9faf225c636ec8c79f" class="nameRef">websNoteRequestActivity</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Take not of the request activity and mark the time.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga1cedecd14d83cdd8dcbffceb8b51791c" class="nameRef">websOpen</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *routes)</td></tr><tr class="apiBrief"><td> </td><td>Open the web server.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1ga7653f9dcb2904cd3632b019273c02ade" class="nameRef">websOpenAuth</a>(int minimal)</td></tr><tr class="apiBrief"><td> </td><td>Open the authentication module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga3e3edc47c5f177466de9c3eabe664b88" class="nameRef">websOpenFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, int mode)</td></tr><tr class="apiBrief"><td> </td><td>Open the web page document for the current request.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga22d74d0805089decff152b0a35d4442f" class="nameRef">websOpenRoute</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the routing module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga690dbbada9274dd35ce9d2a96d981e07" class="nameRef">websOptionsOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the options handler.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gad56c750456cbcb6bde8f6e28d4ba3989" class="nameRef">websOsClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the O/S dependent code.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gada39f22333835280a7be57bd1770aef1" class="nameRef">websOsOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the O/S dependent code.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga42ac8fd2d43cd62e36de672897476033" class="nameRef">websPageClose</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Close the document page.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae3a5d48960ff548b64372bf79d151801" class="nameRef">websPageIsDirectory</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Test if the document page for the request corresponds to a directory.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga550a444cd6c8991eef437ece0cff386a" class="nameRef">websPageOpen</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int mode, int perms)</td></tr><tr class="apiBrief"><td> </td><td>Open a web page document for a request.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga412045a224b12fad35f3ccb0eba21309" class="nameRef">websPageReadData</a>(<a href="#group___webs" class="ref">Webs</a> *wp, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Read data from the request page document.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gade99dac2cc10314deb754833298fc3af" class="nameRef">websPageSeek</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)</td></tr><tr class="apiBrief"><td> </td><td>Seek to a position in the request page document.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gafa581d664b5cc3eacc073d1a5d113d7a" class="nameRef">websPageStat</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td> </td><td>Get file status for the current request document.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gac893e2749beee259505e673c4e551f04" class="nameRef">websParseDateTime</a>(<a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="ref">WebsTime</a> *time, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *date, struct tm *defaults)</td></tr><tr class="apiBrief"><td> </td><td>Parse a date/time string.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1ga0853e59f6f1dba6c94c8d3d659106e7f" class="nameRef">websProcessCgiData</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Process CGI request body data.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gabf36424ddd2ef63ac20fc1419debc90e" class="nameRef">websProcessUploadData</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Process upload data for form, multipart mime file upload.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf8cbf1876923de6cacc9654cb89692dd" class="nameRef">websPump</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Pump the state machine.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga648cc4a4536a44aefcffaa091b3ea37f" class="nameRef">websReadFile</a>(int fd, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Read data from an open file.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#goahead_8h_1a55f60843dbda2cebe58dd6a2c8ad7f76" class="nameRef">websReadPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)</td></tr><tr class="apiBrief"><td> </td><td>Get a password from the terminal console.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1gab71f9da6c9f523bd6486fa9e2065cb5b" class="nameRef">websReadWholeFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)</td></tr><tr class="apiBrief"><td> </td><td>Read all the data from a file.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga71919fc188e9b1f7130891b22181abd4" class="nameRef">websRedirect</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)</td></tr><tr class="apiBrief"><td> </td><td>Redirect the client to a new URL.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga2071f8d94ddff6c2143caeca98e4b28d" class="nameRef">websRedirectByStatus</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status)</td></tr><tr class="apiBrief"><td> </td><td>Redirect the client to a new URI.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1ga19bedf7e54b1993a08f2f6e7ae7dea9c" class="nameRef">websRemoveRole</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role)</td></tr><tr class="apiBrief"><td> </td><td>Remove a role from the system.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1gadccfe94478f976a3a93b8a5b9be1acc0" class="nameRef">websRemoveRoute</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td> </td><td>Remove a route from the routing tables.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_session_1ga7ae8ed7ba925a225ee0bad96f3829c56" class="nameRef">websRemoveSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Remove a session variable.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gaada9cd540cd4c0f488c0acfa1558d4fd" class="nameRef">websRemoveUser</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Remove a user from the system.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gab0e25f7d5e2ab92116e94a3d2f0e6712" class="nameRef">websResponse</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)</td></tr><tr class="apiBrief"><td> </td><td>Create and send a request response.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_runtime_1ga766658ed30f45bec60eef120f2b74c08" class="nameRef">websRestartEvent</a>(int id, int delay)</td></tr><tr class="apiBrief"><td> </td><td>Restart an event.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga5a766509244081e0f76bc70479b2a912" class="nameRef">websRewriteRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)</td></tr><tr class="apiBrief"><td> </td><td>Rewrite a request.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d" class="nameRef">websRouteRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Route a request.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga31529c388cac3e90a71766bc445b6575" class="nameRef">websRunEvents</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Run due events.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_route_1ga13356d1f5c87381edd681495e5187bcd" class="nameRef">websRunRequest</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Run a request handler.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaa36f628a3e14fe08420597095f0f74c2" class="nameRef">websRuntimeClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the runtime code.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4d8e96f6b4a072ca8cadda04912a669e" class="nameRef">websRuntimeOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the runtime code.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a></td><td><a href="#group___webs_1gaca0e8d193f5ad1592e7945ac95d9d96e" class="nameRef">websSeekFile</a>(int fd, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)</td></tr><tr class="apiBrief"><td> </td><td>Seek to a position in the current request page document.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1gae1e0fc3c37a3050a6da804a42637b32e" class="nameRef">websServer</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)</td></tr><tr class="apiBrief"><td> </td><td>One line embedding API.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga81d8a2cfbe5360e1a46011172470368a" class="nameRef">websServiceEvents</a>(int *finished)</td></tr><tr class="apiBrief"><td> </td><td>Service I/O events until finished.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaed3bf51e30277fe1b56379bb6a1b6699" class="nameRef">websSetBackground</a>(int on)</td></tr><tr class="apiBrief"><td> </td><td>Set the background processing flag.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1a5a271ccc2e8fbc76a49f2f2022db21cc" class="nameRef">websSetBackgroundWriter</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1ae4404fa7b2ae18e39956ddbb6d78974d" class="ref">WebsWriteProc</a> proc)</td></tr><tr class="apiBrief"><td> </td><td>Define a background write I/O event callback.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga628ad13f465a4c67339e2b53540ad01a" class="nameRef">websSetCookie</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *domain, int lifespan, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Define a cookie to include in the response.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gae3b839fa0c223b457f109c61c177da96" class="nameRef">websSetDebug</a>(int on)</td></tr><tr class="apiBrief"><td> </td><td>Set the debug processing flag.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaf0802eca30adb2cc9d2b7d2ccc2badc6" class="nameRef">websSetDocuments</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)</td></tr><tr class="apiBrief"><td> </td><td>Set the web documents directory.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga01f49a8761bd89203fa493a79a821e56" class="nameRef">websSetEnv</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Create the CGI environment variables for the current request.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gacba78b1a19ef4ddade76807333243d5c" class="nameRef">websSetFormVars</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Create request variables for query and POST body data.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga826854eb79f23630f7f7905ccf862976" class="nameRef">websSetHost</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host)</td></tr><tr class="apiBrief"><td> </td><td>Define the host name for the server.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga346178ebf1361d67acab6a62ff15adc2" class="nameRef">websSetIndex</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename)</td></tr><tr class="apiBrief"><td> </td><td>Create and send a request response.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7528ade178ede9cd6fe6abe011869dc1" class="nameRef">websSetIpAddr</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr)</td></tr><tr class="apiBrief"><td> </td><td>Define the host IP address.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga46d153b401bb7fc47ae5b17203541644" class="nameRef">websSetLogLevel</a>(int level)</td></tr><tr class="apiBrief"><td> </td><td>Set the current trace log level.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1ae8c0353bf1c238af495fa5e4122b4af6" class="nameRef">websSetMemNotifier</a>(<a href="#goahead_8h_1a3780611857f602b4ea243836f54de556" class="ref">WebsMemNotifier</a> cback)</td></tr><tr class="apiBrief"><td> </td><td>Define a global memory allocation notifier.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_auth_1gac050abeadb21db4a90197eab284b115b" class="nameRef">websSetPasswordStoreVerify</a>(<a href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c" class="ref">WebsVerify</a> verify)</td></tr><tr class="apiBrief"><td> </td><td>Set the password store verify callback.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga9b7ae14718f40340d9621529f4587548" class="nameRef">websSetQueryVars</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Create request variables for query string data.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga0326b013f41e0911bfd8c28f7041f209" class="nameRef">websSetRouteAuth</a>(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *authType)</td></tr><tr class="apiBrief"><td> </td><td>Set route authentication scheme.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_route_1ga02ded6cfc279652c2dca6d86f2adc8d8" class="nameRef">websSetRouteMatch</a>(<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocol, <a href="#group___webs_hash" class="ref">WebsHash</a> methods, <a href="#group___webs_hash" class="ref">WebsHash</a> extensions, <a href="#group___webs_hash" class="ref">WebsHash</a> abilities, <a href="#group___webs_hash" class="ref">WebsHash</a> redirects)</td></tr><tr class="apiBrief"><td> </td><td>Configure a route by adding matching criteria.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_session_1ga7392f09b1b9c7d9d230701d6d2636a5e" class="nameRef">websSetSessionVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td> </td><td>Set a session variable name value.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6" class="nameRef">websSetStatus</a>(<a href="#group___webs" class="ref">Webs</a> *wp, int status)</td></tr><tr class="apiBrief"><td> </td><td>Set the response HTTP status code.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga999bb54215bbc7d71c7d6e828fcf49c8" class="nameRef">websSetTxLength</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)</td></tr><tr class="apiBrief"><td> </td><td>Set the response body content length.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gabf304efa46ec70b19997a6587344c6d1" class="nameRef">websSetUserPassword</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)</td></tr><tr class="apiBrief"><td> </td><td>Set a password for the user.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_auth_1gad77d33b025ea6680b2172f2dac62639b" class="nameRef">websSetUserRoles</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)</td></tr><tr class="apiBrief"><td> </td><td>Define the set of roles for a user.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_1ga7bc119287019bd62d1db463ea72505b5" class="nameRef">websSetVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)</td></tr><tr class="apiBrief"><td> </td><td>Set a request variable to a string value.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="#struct_webs_key" class="ref">WebsKey*</a></td><td><a href="#group___webs_1gae224484206da359d0c9e0a11469d4b4f" class="nameRef">websSetVarFmt</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Set a request variable to a formatted string value.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga3d52faf06a56379bb23247aa9a0acb0f" class="nameRef">websStartEvent</a>(int delay, <a href="#group___webs_runtime_1ga1d4b3f68e80ae2c0095153a94aed1d4a" class="ref">WebsEventProc</a> proc, void *data)</td></tr><tr class="apiBrief"><td> </td><td>Start a callback event.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga040b642a888cc259456bacfec4227217" class="nameRef">websStatFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)</td></tr><tr class="apiBrief"><td> </td><td>Get file status for a file.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_runtime_1ga9a6524bc11288246c84651f99fd24425" class="nameRef">websStopEvent</a>(int id)</td></tr><tr class="apiBrief"><td> </td><td>Stop an event.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1ga7c1b3749d9f6644db2c7a60d44c453db" class="nameRef">websTempFile</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)</td></tr><tr class="apiBrief"><td> </td><td>Create a temporary filename This does not guarantee the filename is unique or that it is not already in use by another application.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gab42afeb8b16720903e8289fcb9c072ba" class="nameRef">websTestVar</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)</td></tr><tr class="apiBrief"><td> </td><td>Test if a request variable is defined.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1gafc3db65ebb5f3a86ec0e3ccde56c1f31" class="nameRef">websTimeClose</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Close the date/time parsing module.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga4a94586b4fdeb3c91b1555c3d70151a0" class="nameRef">websTimeOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the date/time parsing module.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="nameRef">websUploadOpen</a>(void)</td></tr><tr class="apiBrief"><td> </td><td>Open the file upload filter.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga8c080d18fb0f34cb68759bce48eac7d9" class="nameRef">websUrlParse</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url, char **buf, char **protocol, char **host, char **port, char **path, char **ext, char **reference, char **query)</td></tr><tr class="apiBrief"><td> </td><td>Parse a URL into its components.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gaebff2db9e8b7a70579082cf92593bcfe" class="nameRef">websValid</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Test if a webs object is valid.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_1gafd15ff2fac3a34650837fec69124b2a2" class="nameRef">websValidUriChars</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td> </td><td>Test if a URI is using only valid characters Note this does not test if the URI is fully legal.</td></tr>
- <tr class="apiDef"><td class="apiType">char*</td><td><a href="#group___webs_1gaf2f303661dab21b74f2ed7c88d741486" class="nameRef">websValidateUriPath</a>(<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)</td></tr><tr class="apiBrief"><td> </td><td>Validate a URI path as expected in a HTTP request line.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1ga85dd3dca55f2cba94bd02ac206acb70f" class="nameRef">websVerifyPasswordFromCustom</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>User password verification routine from a custom password back-end store.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a></td><td><a href="#group___webs_auth_1gacf13eed5b4f7dff570f75098a1e34923" class="nameRef">websVerifyPasswordFromFile</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>User password verification routine from auth.txt.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gac41407ff97f138db72108cb142258f5e" class="nameRef">websWrite</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Write data to the response.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga9b63519c49d00fae1e06b2c918f970f7" class="nameRef">websWriteBlock</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Write a block of data to the response.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga7b3fddd74796c79f7e41e8bd9ce107a4" class="nameRef">websWriteEndHeaders</a>(<a href="#group___webs" class="ref">Webs</a> *wp)</td></tr><tr class="apiBrief"><td> </td><td>Signify the end of the response headers.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1gadd0a77daf2fd10766c587c179b09081e" class="nameRef">websWriteFile</a>(int fd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Write data to the open file.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_1ga34f4159f41e89e67c22a8767d6cd98bb" class="nameRef">websWriteHeader</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)</td></tr><tr class="apiBrief"><td> </td><td>Write a response header.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#group___webs_1ga174c1184ac25621b34337fe47e3be7d6" class="nameRef">websWriteHeaders</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> contentLength, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *redirect)</td></tr><tr class="apiBrief"><td> </td><td>Write a set of standard response headers.</td></tr>
- <tr class="apiDef"><td class="apiType"><a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a></td><td><a href="#group___webs_1ga8712767b916c5e7a281760ee5d0cbb12" class="nameRef">websWriteSocket</a>(<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)</td></tr><tr class="apiBrief"><td> </td><td>Write a block of data to the network.</td></tr>
- <tr class="apiDef"><td class="apiType">void</td><td><a href="#goahead_8h_1acd2db135e5aacbdc8e6a1f766298b2dd" class="nameRef">wfree</a>(void *blk)</td></tr><tr class="apiBrief"><td> </td><td>Free an allocated block of memory.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="nameRef">wfreeHandle</a>(void *map, int handle)</td></tr><tr class="apiBrief"><td> </td><td>Free a handle in the map.</td></tr>
- <tr class="apiDef"><td class="apiType">int</td><td><a href="#goahead_8h_1a0cdb01392e19df341254c5b2f593c654" class="nameRef">wopenAlloc</a>(void *buf, int bufsize, int flags)</td></tr><tr class="apiBrief"><td> </td><td>Initialize the walloc module.</td></tr>
- <tr class="apiDef"><td class="apiType">void*</td><td><a href="#goahead_8h_1a7cf93f44c111affc69d877812da50bae" class="nameRef">wrealloc</a>(void *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> newsize)</td></tr><tr class="apiBrief"><td> </td><td>Reallocate a block of memory and grow its size.</td></tr>
- </table>
- <a name="Typedefs"></a><h1>Typedefs</h1>
- <table class="apiIndex" title="typedefs">
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92" class="nameRef">SocketAccept</a></td><td class="apiBrief">Socket accept callback.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_socket_1ga657e287f5f61294f65c3092a0e0b5e18" class="nameRef">SocketHandler</a></td><td class="apiBrief">Socket I/O callback.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1gaef2ecde6d7702a3510c2848ee0fc5934" class="nameRef">WebsAction</a></td><td class="apiBrief">Action callback.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga6e48901e1591eed982ca02059748538b" class="nameRef">WebsAskLogin</a></td><td class="apiBrief">Callback to prompt the user for their password.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_error" class="nameRef">WebsError</a></td><td class="apiBrief">Error code list.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_runtime_1ga1d4b3f68e80ae2c0095153a94aed1d4a" class="nameRef">WebsEventProc</a></td><td class="apiBrief">Callback function for events.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_file_info" class="nameRef">WebsFileInfo</a></td><td class="apiBrief">File information structure.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_handler" class="nameRef">WebsHandler</a></td><td class="apiBrief">GoAhead handler object.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1gaaf026187015f50b6c6068f996cad29fc" class="nameRef">WebsHandlerClose</a></td><td class="apiBrief">GoAhead handler close to release memory prior to shutdown.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442" class="nameRef">WebsHandlerProc</a></td><td class="apiBrief">GoAhead handler service callback.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="nameRef">WebsHash</a></td><td class="apiBrief">Hash table ID returned by hashCreate.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga95d129571903557ca1817968430bafd9" class="nameRef">WebsJstProc</a></td><td class="apiBrief">Javascript native function.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="nameRef">WebsLogHandler</a></td><td class="apiBrief">Callback for emitting trace log output.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_mime" class="nameRef">WebsMime</a></td><td class="apiBrief">Mime type list.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga15af4264d6a7f06686169c0ca2fd397e" class="nameRef">WebsParseAuth</a></td><td class="apiBrief">Callback to parse authentication details submitted with the web request.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_role" class="nameRef">WebsRole</a></td><td class="apiBrief">Role definition structure.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_rom_index" class="nameRef">WebsRomIndex</a></td><td class="apiBrief">Compiled Rom Page Index.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1a3a874b92bbb07540254ed16567db3aa3" class="nameRef">WebsStat</a></td><td class="apiBrief">File status structure.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="nameRef">WebsTime</a></td><td class="apiBrief">System native time type.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_user" class="nameRef">WebsUser</a></td><td class="apiBrief">User definition structure.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#struct_webs_value" class="nameRef">WebsValue</a></td><td class="apiBrief">Value union to store primitive value types.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c" class="nameRef">WebsVerify</a></td><td class="apiBrief">Callback to verify the username and password.</td></tr>
- <tr class="apiDef"><td class="apiName"><a href="#goahead_8h_1ae4404fa7b2ae18e39956ddbb6d78974d" class="nameRef">WebsWriteProc</a></td><td class="apiBrief">Callback for write I/O events.</td></tr>
- </table>
- <a name="Defines"></a><h1>Defines</h1>
- <table class="apiIndex" title="Defines">
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a1efdfd58d322aa536b75deecf922f1c8" class="nameRef">HTTP_CODE_ACCEPTED</a> 202</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has been accepted and processing is continuing.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0af0302aed58ea49fd6b1be26179585c" class="nameRef">HTTP_CODE_BAD_GATEWAY</a> 502</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server cannot act as a gateway for the given request.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a8b9b86ec8ac18bf9e606f22c0921dd4a" class="nameRef">HTTP_CODE_BAD_METHOD</a> 405</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request HTTP method was not supported by the resource.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a16c7e21f17349c2515fe0134f9b7ffd4" class="nameRef">HTTP_CODE_BAD_REQUEST</a> 400</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request is malformed.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aa7dc3796cad07c52f3db7ed660948405" class="nameRef">HTTP_CODE_BAD_VERSION</a> 505</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server does not support the HTTP protocol version.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac4e84c07da5d5314255265a9470004fe" class="nameRef">HTTP_CODE_COMMS_ERROR</a> 550</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server had a communications error responding to the client.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a33cde539885f920737a6c148f854aa15" class="nameRef">HTTP_CODE_CONFLICT</a> 409</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request had a conflict in the request headers and URI.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad1f324698e12fefadfc2ec5d16ce6a5b" class="nameRef">HTTP_CODE_CONTINUE</a> 100</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Continue with request, only partial content transmitted.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a00c11c6c6bf42cf1fb483c273454cf45" class="nameRef">HTTP_CODE_CREATED</a> 201</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has completed and a new resource was created.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a7b7785ff11163b18f12bc2d66f728abe" class="nameRef">HTTP_CODE_EXPECTATION_FAILED</a> 417</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server cannot satisfy the Expect header requirements.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac68e0a1d868dad52967d757dab5220db" class="nameRef">HTTP_CODE_FORBIDDEN</a> 403</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request was legal, but the server refuses to process.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ab24790eefb565c4e7064438592e32204" class="nameRef">HTTP_CODE_GATEWAY_TIMEOUT</a> 504</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server gateway timed out waiting for the upstream server.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0eeb0f3801fbd1ca5d0f050e12426768" class="nameRef">HTTP_CODE_GONE</a> 410</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested resource is no longer available.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1af7fab487ecc4f937304ff5ad1fd97330" class="nameRef">HTTP_CODE_INSUFFICIENT_STORAGE</a> 507</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server has insufficient storage to complete the request.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a6d47746cc8b934944ed4f05308b2da63" class="nameRef">HTTP_CODE_INTERNAL_SERVER_ERROR</a> 500</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Server processing or configuration error.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1af92be73f22cd3758211ce5b90ec64572" class="nameRef">HTTP_CODE_LENGTH_REQUIRED</a> 411</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request did not specify a required content length.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a3d8f6601017c97af5fe8bd5267be8b02" class="nameRef">HTTP_CODE_MOVED_PERMANENTLY</a> 301</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested URI has moved permanently to a new location.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a33f32423ccbf3a2a61f56cc5aee18cd8" class="nameRef">HTTP_CODE_MOVED_TEMPORARILY</a> 302</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The URI has moved temporarily to a new location.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a7e41c8a47383e2bdf4b34ce5510bc9b6" class="nameRef">HTTP_CODE_NO_CONTENT</a> 204</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has completed and there is no response to send.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a1159b67860d06bcce578f8d4d0083070" class="nameRef">HTTP_CODE_NO_RESPONSE</a> 444</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The connection was closed with no response to the client.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aa44abbf9540845f062801eb5bff8a128" class="nameRef">HTTP_CODE_NOT_ACCEPTABLE</a> 406</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested resource cannot generate the required content.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0a20b658e0dc1c0634a4eb5b07b36d52" class="nameRef">HTTP_CODE_NOT_AUTHORITATIVE</a> 203</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has completed but content may be from another source.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a20eb5cc8af538c827de0f7ed9811243c" class="nameRef">HTTP_CODE_NOT_FOUND</a> 404</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested resource was not found.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a9e272d1190eb37ce4447a9021f68a0c4" class="nameRef">HTTP_CODE_NOT_IMPLEMENTED</a> 501</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server does not recognize the request or method.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a225a5999b63c699c4492a8412b315452" class="nameRef">HTTP_CODE_NOT_MODIFIED</a> 304</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested resource has changed since the last request.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a471de168f41ecf5e8d62a43fea28b5d7" class="nameRef">HTTP_CODE_OK</a> 200</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request completed successfully.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ae55f28c554e19bbddaba95fdb81c90e0" class="nameRef">HTTP_CODE_PARTIAL</a> 206</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has completed and is returning partial content.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ab772ef28d09ec65afdfc7b67ca29c4b8" class="nameRef">HTTP_CODE_PAYMENT_REQUIRED</a> 402</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Reserved for future use.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a9b62630f040b66859f1b08380ac52250" class="nameRef">HTTP_CODE_PRECOND_FAILED</a> 412</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server cannot satisfy one of the request preconditions.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1abf878ed6908fa91fca3138731e7033a2" class="nameRef">HTTP_CODE_RANGE_NOT_SATISFIABLE</a> 416</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request content range does not exist for the resource.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aac7ff73346b1a2812e6b2cde68ace003" class="nameRef">HTTP_CODE_REQUEST_TIMEOUT</a> 408</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server timed out waiting for the request to complete.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a9d41ec497841c29d86a1b9ef93a6316d" class="nameRef">HTTP_CODE_REQUEST_TOO_LARGE</a> 413</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request is too large for the server to process.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a4b04fb7856d5d412df31b0d9528d6191" class="nameRef">HTTP_CODE_REQUEST_URL_TOO_LARGE</a> 414</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request URI is too long for the server to process.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aab1d80e99e8e1db0a8a4531c69f037c9" class="nameRef">HTTP_CODE_RESET</a> 205</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request has completed with no content.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a81767ddf9b55cb683935842e67b93680" class="nameRef">HTTP_CODE_SEE_OTHER</a> 303</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested URI can be found at another URI location.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a00a05677bf92a38abf5be28b5ce0d294" class="nameRef">HTTP_CODE_SERVICE_UNAVAILABLE</a> 503</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The server is currently unavailable or overloaded.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a12036a2f5ae164e644d3a063864cb1a1" class="nameRef">HTTP_CODE_TEMPORARY_REDIRECT</a> 307</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request should be repeated at another URI location.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a4667745cca24cb084488393a562647aa" class="nameRef">HTTP_CODE_UNAUTHORIZED</a> 401</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Authentication for the request has failed.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad0f303cb6433d273adbfd7a8db38f720" class="nameRef">HTTP_CODE_UNSUPPORTED_MEDIA_TYPE</a> 415</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The request media type is not supported by the server or resource.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a368ec3a2d7da1dc0a43de55c829ae97b" class="nameRef">HTTP_CODE_USE_PROXY</a> 305</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The requested resource must be accessed via the location proxy.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aee091362584fd5f1b74019bee924bfbb" class="nameRef">ME_MAX_IP</a> 64</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Maximum IP address size.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a85ee14e72ab035c35530a02e9f6a1859" class="nameRef">SOCKET_AGAIN</a> 4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Issue the request again.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a6db72d1b78eff6c606633c46190078dc" class="nameRef">SOCKET_ASYNC</a> 0x8</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Use async connect.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a15bfb9f8b3f96c54b4121ddc58018b08" class="nameRef">SOCKET_BLOCK</a> 0x10</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Use blocking I/O.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a54d9954c6658013ffaf6a745b530f9f5" class="nameRef">SOCKET_BUFFERED_READ</a> 0x200</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Message pending on this socket.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1adabe453ca2913d78fc8bbc5a4c91a455" class="nameRef">SOCKET_BUFFERED_WRITE</a> 0x400</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Message pending on this socket.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a2e950af59def710c7fc0745860e2ed2a" class="nameRef">SOCKET_CLOSING</a> 0x40</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket is closing.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a77b85be920c891600f978c675884fa7c" class="nameRef">SOCKET_CONNECTING</a> 0x2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Connect in progress.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a46f9c219ce9e6e0198c95b091ae49d92" class="nameRef">SOCKET_CONNRESET</a> 0x80</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket connection was reset.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1abefba48844b9ab23b89c3a7736ef0778" class="nameRef">SOCKET_EOF</a> 0x1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Seen end of file.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a5b1aa2c0ae9c92a40413887ef6c51448" class="nameRef">SOCKET_EXCEPTION</a> 0x8</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Interested in exceptions.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a95fa0331fc156e74ab809345d76c3760" class="nameRef">SOCKET_HANDSHAKING</a> 0x100</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Doing SSL handshake.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1acde08b14ccbd79f650c92bc209d6026b" class="nameRef">SOCKET_INTR</a> 5</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Call was interrupted.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a9815fe10f80b45a92172de59bc8effb4" class="nameRef">SOCKET_INVAL</a> 6</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Invalid.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ae817478fd76f7c8ab0e4cb4afd2fdbe7" class="nameRef">SOCKET_LISTENING</a> 0x20</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket is server listener.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a4ca860e3aca64e92a0efb6dfa76c4bc5" class="nameRef">SOCKET_NETDOWN</a> 3</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Network is down.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad5ce2512b2ef7ec98f3a3d75388de7fd" class="nameRef">SOCKET_NODELAY</a> 0x800</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Disable Nagle algorithm.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad138fc891e1a07ca7be084c13140a750" class="nameRef">SOCKET_PORT_MAX</a> 0xffff</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Max Port size.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a8b56e2a409b2468f527d17c5e82cbea6" class="nameRef">SOCKET_READABLE</a> 0x2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Make socket readable.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a2cd104f31be96aaa2d1d3a2386682430" class="nameRef">SOCKET_RESERVICE</a> 0x4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket needs re-servicing.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ab8aedcb785ff519c36d26ec43a8e95d7" class="nameRef">SOCKET_RESET</a> 2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket has been reset.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad82a8f322ed6b5db8563862d9dc78454" class="nameRef">SOCKET_WOULDBLOCK</a> 1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Socket would block on I/O.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a200ee94b56ff93dfbe869aeebeb0f2ed" class="nameRef">SOCKET_WRITABLE</a> 0x4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Make socket writable.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad67de85ec9f1c5f73e756af3054bd78b" class="nameRef">VALUE_ALLOCATE</a> 0x1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Allocate strings using malloc.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a341a7720a9020d6a29fd77b540422579" class="nameRef">value_numeric</a> (t >= byteint && t <= big)</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The value is a numeric type.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac0bedfb6f2b538f9459d04e0d60e2935" class="nameRef">value_ok</a> (t > undefined && t <= symbol)</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The value is valid supported type.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0c4fe8ad2c4157463c53d540b526a7db" class="nameRef">value_str</a> (t >= string && t <= bytes)</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>The value is a string type.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aadc5370e3a0792f775995331b9da51cb" class="nameRef">WEBS_ACCEPTED</a> 0x1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>TLS connection accepted.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a6b611de53ee235ac552b2cd87750955d" class="nameRef">WEBS_ASSERT_MSG</a> 0x10</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Originated from assert.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a4d8188c7828dfb02d45653a83b3761d6" class="nameRef">WEBS_BEGIN</a> 0</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Beginning state.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ae0e37be791db29aacc26b899596f21c6" class="nameRef">WEBS_CHUNK_DATA</a> 3</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Start of chunk data.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a599da0f60dabc762dbf1a6b303bd6cab" class="nameRef">WEBS_CHUNK_HEADER</a> 2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Preparing tx chunk header.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ae8a0189bb1a76bacdd40f3e448486dbd" class="nameRef">WEBS_CHUNK_START</a> 1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Start of a new chunk.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a2ef42bef1fe656be2d208c3116c75d23" class="nameRef">WEBS_CHUNK_UNCHUNKED</a> 0</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Data is not transfer-chunk encoded.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a7cdb57c12b6fb4c9a4cde3e0c51af3a7" class="nameRef">WEBS_CHUNKING</a> 0x2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Currently chunking output body data.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a798cdf39a853d9d287a10c6d7d8d0f0c" class="nameRef">WEBS_CLOSE</a> 0x20000</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Close connection.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aaa3cf9edabf08d9e8d7c679e82c04c82" class="nameRef">WEBS_CLOSED</a> 0x4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Connection closed, ready to free.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a5803d77a5e168a028219e5d37e8453e5" class="nameRef">WEBS_CODE_MASK</a> 0xFFFF</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Mask valid status codes.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0f6ea1e528550a08c75510244019623d" class="nameRef">WEBS_COMPLETE</a> 4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Request complete.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a372d1bd70d208f72ede723046493fbcd" class="nameRef">WEBS_CONFIG</a> 2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Configuration settings trace level.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0d9a3cace663a786a25612d4ea507d4d" class="nameRef">WEBS_CONTENT</a> 1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Ready for body data.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aae31b3bad03626c2cddc014fb995d947" class="nameRef">WEBS_COOKIE</a> 0x8</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Cookie supplied in request.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a0542132a4a1e922f07cedb9fc62345af" class="nameRef">WEBS_COOKIE_HTTP</a> 0x2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for websSetCookie for http cookies (http only).</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac781b97e1ab0c4c56f9c260503845574" class="nameRef">WEBS_COOKIE_SAME_LAX</a> 0x4</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for websSetCookie for SameSite=Lax.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a84086482ebed4821bc2304f1319ecf12" class="nameRef">WEBS_COOKIE_SAME_STRICT</a> 0x8</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for websSetCookie for SameSite=Strict.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ab4d2a11360e7f9acdfc46d917d6c2695" class="nameRef">WEBS_COOKIE_SECURE</a> 0x1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for websSetCookie for secure cookies (https only).</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a1646430a51608c0851ea5beae48a2b59" class="nameRef">WEBS_DECODE_TOKEQ</a> 1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Decode base 64 blocks up to a NULL or equals.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1abe62c79451680724ff4cb5d15c8eb4d0" class="nameRef">WEBS_ERROR</a> 1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Standard logging trace levels are 0 to 9 with 0 being the most verbose.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1afe57ae729fd2df14f7f60dd621797f35" class="nameRef">WEBS_ERROR_MSG</a> 0x20</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Originated from error.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a52a69dfd87586752955431da82cb93f4" class="nameRef">WEBS_FINALIZED</a> 0x10</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Output is finalized.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a07b35d14e2525658fe2e57c4a2ba8b86" class="nameRef">WEBS_FORM</a> 0x20</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Request is a form (url encoded data).</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a99e42945b85f2f9946f3db27ca0e92e9" class="nameRef">WEBS_HEADERS_CREATED</a> 0x40</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Headers have been created and buffered.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac91876c9dd625cfacab287b19963b3be" class="nameRef">WEBS_HTTP11</a> 0x80</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Request is using HTTP/1.1.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a2f030fa0b014ba8dcaa67aae493750b5" class="nameRef">WEBS_JSON</a> 0x100</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Request has a JSON payload.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ab4d91d57c30dbfe518be10b0e28eb237" class="nameRef">WEBS_KEEP_ALIVE</a> 0x200</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>HTTP/1.1 keep alive.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ae6d0c0d34e9e57dd42fc447807d3fc84" class="nameRef">WEBS_LEVEL_MASK</a> 0xF</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Level mask.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1aa89bb6f9f5ce05683bc6d36a814aa1b7" class="nameRef">WEBS_LOG_MSG</a> 0x100</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Originated from logmsg.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a25bcde7fa767594ca76c2f657565152d" class="nameRef">WEBS_MAX_LISTEN</a> 8</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Maximum number of listen endpoints.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ac2cd905dd716db4a61d7695c8b13d5ee" class="nameRef">WEBS_MAX_PASSWORD</a> 32</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Default maximum password.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a65b56de5c558a48c5167471245b82987" class="nameRef">WEBS_NOLOG</a> 0x40000</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Don't write error to log.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a7c2fa959a96c4040aa551cf9ddd0753c" class="nameRef">WEBS_RAW_MSG</a> 0x200</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Raw message output.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a43ffc2adb5fe2908fd3757029d070313" class="nameRef">WEBS_READY</a> 2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Ready to route and start handler.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1af97a00bf1e3283dd14196e29005796b5" class="nameRef">WEBS_REROUTE</a> 0x400</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Restart route matching.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1affca463a40f2f7aee71a6bcd909906d6" class="nameRef">WEBS_RESPONSE_TRACED</a> 0x800</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Started tracing the response.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a8c49bc25464dbfbdf0b45b84be4ebb5d" class="nameRef">WEBS_RUNNING</a> 3</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Processing request.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a166e115282d96ae40b39515a2fff9772" class="nameRef">WEBS_SECURE</a> 0x1000</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Connection uses SSL.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a74710a46052fef4648a4192538741a0a" class="nameRef">WEBS_SMALL_HASH</a> 31</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>General small hash size.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a3acc26f07aa103879649afa4ad81fc4e" class="nameRef">WEBS_TRACE_MSG</a> 0x400</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Originated from trace.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a97b3ad9c701c52137117f6d82702895a" class="nameRef">WEBS_TRIM_BOTH</a> 0x3</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for strim to trim from both the start and the end of the string.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1acd059bb8f02892cb0093e5bb7c13c99a" class="nameRef">WEBS_TRIM_END</a> 0x2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for strim to trim from the end of the string.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1ad185deb88c41c92632f330d3191f73af" class="nameRef">WEBS_TRIM_START</a> 0x1</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Flag for strim to trim from the start of the string.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1af5bbd57723f7a60b90ac58a2b56ca7f1" class="nameRef">WEBS_UPLOAD</a> 0x2000</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Multipart-mime file upload.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a876b6dcf5241c4052f16ebdf2a69be21" class="nameRef">WEBS_VARS_ADDED</a> 0x4000</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Query and body form vars added.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a8a69332ca259f6a5ee5e7dd145f254b2" class="nameRef">WEBS_VERBOSE</a> 9</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Highest level of trace.</td></tr>
- <tr class="apiDef">
- <td>#define</td><td><a href="#goahead_8h_1a971517f9ec706c960482115682b44653" class="nameRef">WEBS_WARN</a> 2</td>
- </tr>
- <tr class="apiBrief"><td> </td><td>Soft warning trace level.</td></tr>
- </table>
- <h1>Webs</h1>
- <a name="group___webs"></a>
- <div class="api">
- <div class="prototype">Webs</div>
- <div class="apiDetail">
- <p>GoAhead request structure.</p>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">char *</td><td><td>authDetails</td><td>
- Http header auth details.
- </td>
- <tr><td class="param">char *</td><td><td>authResponse</td><td>
- Outgoing auth header.
- </td>
- <tr><td class="param">char *</td><td><td>authType</td><td>
- Authorization type (Basic/DAA).
- </td>
- <tr><td class="param">char *</td><td><td>boundary</td><td>
- Mime boundary (static).
- </td>
- <tr><td class="param">ssize</td><td><td>boundaryLen</td><td>
- Boundary length.
- </td>
- <tr><td class="param">int</td><td><td>cgifd</td><td>
- File handle for CGI program input.
- </td>
- <tr><td class="param">char *</td><td><td>cgiStdin</td><td>
- Filename for CGI program input.
- </td>
- <tr><td class="param">WebsBuf</td><td><td>chunkbuf</td><td>
- Pre-chunking data buffer.
- </td>
- <tr><td class="param">char *</td><td><td>clientFilename</td><td>
- Current file filename.
- </td>
- <tr><td class="param">int</td><td><td>code</td><td>
- Response status code.
- </td>
- <tr><td class="param">uint</td><td><td>connError</td><td>
- Request has a connection error.
- </td>
- <tr><td class="param">char *</td><td><td>contentType</td><td>
- Body content type.
- </td>
- <tr><td class="param">char *</td><td><td>cookie</td><td>
- Request cookie string.
- </td>
- <tr><td class="param">WebsUpload *</td><td><td>currentFile</td><td>
- Current file context.
- </td>
- <tr><td class="param">char *</td><td><td>decodedQuery</td><td>
- Decoded request query.
- </td>
- <tr><td class="param">char *</td><td><td>digest</td><td>
- Password digest.
- </td>
- <tr><td class="param">int</td><td><td>docfd</td><td>
- File descriptor for document being served.
- </td>
- <tr><td class="param">int</td><td><td>encoded</td><td>
- True if the password is MD5(username:realm:password).
- </td>
- <tr><td class="param">bool</td><td><td>eof</td><td>
- If at the end of the request content.
- </td>
- <tr><td class="param">uint</td><td><td>error</td><td>
- Request has an error.
- </td>
- <tr><td class="param">char *</td><td><td>ext</td><td>
- Path extension.
- </td>
- <tr><td class="param">char *</td><td><td>filename</td><td>
- Document path name.
- </td>
- <tr><td class="param">WebsHash</td><td><td>files</td><td>
- Uploaded files.
- </td>
- <tr><td class="param">uint</td><td><td>finalized</td><td>
- Request has been completed.
- </td>
- <tr><td class="param">int</td><td><td>flags</td><td>
- Current flags <ndash/> see above.
- </td>
- <tr><td class="param">char *</td><td><td>host</td><td>
- Requested host.
- </td>
- <tr><td class="param">char</td><td><td>ifaddr[ME_MAX_IP]</td><td>
- Local interface ipaddress.
- </td>
- <tr><td class="param">WebsBuf</td><td><td>input</td><td>
- Receive buffer after de-chunking.
- </td>
- <tr><td class="param">char</td><td><td>ipaddr[ME_MAX_IP]</td><td>
- Connecting ipaddress.
- </td>
- <tr><td class="param">ssize</td><td><td>lastRead</td><td>
- Number of bytes last read from the socket.
- </td>
- <tr><td class="param">int</td><td><td>listenSid</td><td>
- Listen Socket id.
- </td>
- <tr><td class="param">char *</td><td><td>method</td><td>
- HTTP request method.
- </td>
- <tr><td class="param">WebsBuf</td><td><td>output</td><td>
- Transmit buffer after chunking.
- </td>
- <tr><td class="param">char *</td><td><td>password</td><td>
- Authorization password.
- </td>
- <tr><td class="param">char *</td><td><td>path</td><td>
- Path name without query.
- This is decoded.
- </td>
- <tr><td class="param">int</td><td><td>port</td><td>
- Request port number.
- </td>
- <tr><td class="param">char *</td><td><td>protocol</td><td>
- Protocol scheme (normally http|https).
- </td>
- <tr><td class="param">char *</td><td><td>protoVersion</td><td>
- Protocol version (HTTP/1.1).
- </td>
- <tr><td class="param">ssize</td><td><td>putLen</td><td>
- Bytes read by a PUT request.
- </td>
- <tr><td class="param">char *</td><td><td>putname</td><td>
- PUT temporary filename.
- </td>
- <tr><td class="param">char *</td><td><td>query</td><td>
- Request query.
- This is decoded.
- </td>
- <tr><td class="param">char *</td><td><td>realm</td><td>
- Realm field supplied in auth header.
- </td>
- <tr><td class="param">char *</td><td><td>referrer</td><td>
- The referring page.
- </td>
- <tr><td class="param">WebsHash</td><td><td>responseCookies</td><td>
- Outgoing cookies.
- </td>
- <tr><td class="param">struct WebsRoute *</td><td><td>route</td><td>
- Request route.
- </td>
- <tr><td class="param">int</td><td><td>routeCount</td><td>
- Route count limiter.
- </td>
- <tr><td class="param">WebsBuf</td><td><td>rxbuf</td><td>
- Raw receive buffer.
- </td>
- <tr><td class="param">ssize</td><td><td>rxChunkSize</td><td>
- Rx chunk size.
- </td>
- <tr><td class="param">int</td><td><td>rxChunkState</td><td>
- Rx chunk encoding state.
- </td>
- <tr><td class="param">char *</td><td><td>rxEndp</td><td>
- Pointer to end of raw data in input beyond endp.
- </td>
- <tr><td class="param">ssize</td><td><td>rxLen</td><td>
- Rx content length.
- </td>
- <tr><td class="param">ssize</td><td><td>rxRemaining</td><td>
- Remaining content to read from client.
- </td>
- <tr><td class="param">struct WebsSession *</td><td><td>session</td><td>
- Session record.
- </td>
- <tr><td class="param">int</td><td><td>sid</td><td>
- Socket id (handler).
- </td>
- <tr><td class="param">WebsTime</td><td><td>since</td><td>
- Parsed if-modified-since time.
- </td>
- <tr><td class="param">void *</td><td><td>ssl</td><td>
- SSL context.
- </td>
- <tr><td class="param">int</td><td><td>state</td><td>
- Current state.
- </td>
- <tr><td class="param">int</td><td><td>timeout</td><td>
- Timeout handle.
- </td>
- <tr><td class="param">WebsTime</td><td><td>timestamp</td><td>
- Last transaction with browser.
- </td>
- <tr><td class="param">ssize</td><td><td>txChunkLen</td><td>
- Length of the chunk.
- </td>
- <tr><td class="param">char</td><td><td>txChunkPrefix[16]</td><td>
- Transmit chunk prefix.
- </td>
- <tr><td class="param">ssize</td><td><td>txChunkPrefixLen</td><td>
- Length of prefix.
- </td>
- <tr><td class="param">char *</td><td><td>txChunkPrefixNext</td><td>
- Current I/O pos in txChunkPrefix.
- </td>
- <tr><td class="param">int</td><td><td>txChunkState</td><td>
- Transmit chunk state.
- </td>
- <tr><td class="param">ssize</td><td><td>txLen</td><td>
- Tx content length header value.
- </td>
- <tr><td class="param">int</td><td><td>upfd</td><td>
- Upload file handle.
- </td>
- <tr><td class="param">int</td><td><td>uploadState</td><td>
- Current file upload state.
- </td>
- <tr><td class="param">char *</td><td><td>uploadTmp</td><td>
- Current temp filename for upload data.
- </td>
- <tr><td class="param">char *</td><td><td>uploadVar</td><td>
- Current upload form variable name.
- </td>
- <tr><td class="param">char *</td><td><td>url</td><td>
- Full request url.
- This is not decoded.
- </td>
- <tr><td class="param">struct <a class="ref" href="#struct_webs_user">WebsUser</a> *</td><td><td>user</td><td>
- User auth record.
- </td>
- <tr><td class="param">char *</td><td><td>userAgent</td><td>
- User agent (browser).
- </td>
- <tr><td class="param">char *</td><td><td>username</td><td>
- Authorization username.
- </td>
- <tr><td class="param">WebsHash</td><td><td>vars</td><td>
- CGI standard variables.
- </td>
- <tr><td class="param">int</td><td><td>wid</td><td>
- Index into webs.
- </td>
- <tr><td class="param">WebsWriteProc</td><td><td>writeData</td><td>
- Handler write I/O event callback.
- Used by fileHandler.
- </td>
- <tr><td class="param">ssize</td><td><td>written</td><td>
- Bytes actually transferred.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7e6149e63a2f4ad6fc53ac6ac60cec1a"></a>
- <div class="api">
- <div class="prototype">
- void
- sslClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the ssl module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaeebef5121f49387a67fc33de42aefffe"></a>
- <div class="api">
- <div class="prototype">
- void
- sslFree
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Free a ssl connection associated with a request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga81e8547c8bf48f6b74e0ea2fab0a296c"></a>
- <div class="api">
- <div class="prototype">
- int
- sslOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the ssl module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8063a955fe7c9d4f3f1ccb036d186835"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- sslRead
- (<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Read data from a secure socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">buf</td><td>Buffer into which to read data.</td>
- <tr><td class="param">len</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga0ceefc6dfb2a71dec6c5a18b37097c64"></a>
- <div class="api">
- <div class="prototype">
- int
- sslUpgrade
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Upgrade a request connection to utilize SSL.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine is invoked on a connection received on a secure listening socket.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf190d807759ac01cad747d013b1893cf"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- sslWrite
- (<a href="#group___webs" class="ref">Webs</a> *wp, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>WRite data to a secure socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">buf</td><td>Buffer from which to write data.</td>
- <tr><td class="param">len</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes written if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga0a02508940140401b730219dba7295d5"></a>
- <div class="api">
- <div class="prototype">
- int
- websAccept
- (int sid, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr, int port, int listenSid)
- </div>
- <div class="apiDetail">
- <p>Accept a new connection.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
- <tr><td class="param">ipaddr</td><td>IP address originating the connection.</td>
- <tr><td class="param">port</td><td>Port number originating the connection.</td>
- <tr><td class="param">listenSid</td><td>Socket ID of the listening socket.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf903a6d7928616f803d294de73f8cd11"></a>
- <div class="api">
- <div class="prototype">
- void
- websActionOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the action handler.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga069bb8b6d336ca5f8ea2f3b8c113371b"></a>
- <div class="api">
- <div class="prototype">
- int
- websAlloc
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Allocate a new Webs object.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The webs[] handle index for the allocated Webs object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gad02e7e70e4f3b7bca1ee2a318a336e80"></a>
- <div class="api">
- <div class="prototype">
- void
- websCancelTimeout
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Cancel the request timeout.</p>
- <dl><dt><b>Description</b>:</dt><dd>Handlers may choose to manually manage the request timeout. This routine will disable the centralized management of the timeout for this request.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac05856f3dd04aeef0732570bedf044ad"></a>
- <div class="api">
- <div class="prototype">
- int
- websCgiHandler
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>CGI handler service callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns 1 if the request was handled.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae908f662db14b2f0571634f48dda790c"></a>
- <div class="api">
- <div class="prototype">
- int
- websCgiOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the CGI handler.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac14f9e9acabae760c4225c6a372747a5"></a>
- <div class="api">
- <div class="prototype">
- int
- websCgiPoll
- (void )
- </div>
- <div class="apiDetail">
- <p>Poll for output from CGI processes and output.</p>
- <dl><dt>Returns:</dt><dd>Time delay till next poll.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga94471225b733c21ebe13449aed71cf98"></a>
- <div class="api">
- <div class="prototype">
- void
- websClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the core GoAhead web server module.</p>
- <dl><dt><b>Description</b>:</dt><dd>Invoked when GoAhead is shutting down.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac3d3297f51f566d7dcd0c1003180f210"></a>
- <div class="api">
- <div class="prototype">
- void
- websCloseFile
- (int fd)
- </div>
- <div class="apiDetail">
- <p>Close an open file.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga2ebc310e8ccbfd0e52a29d5f8d192b13"></a>
- <div class="api">
- <div class="prototype">
- int
- websCompareVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *var, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
- </div>
- <div class="apiDetail">
- <p>Compare a request variable.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">var</td><td>Variable name.</td>
- <tr><td class="param">value</td><td>Value to compare with.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the value matches. Otherwise return 0.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga6e0b2ea7b62d847fd10d7bb761d1189e"></a>
- <div class="api">
- <div class="prototype">
- void
- websConsumeInput
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> nbytes)
- </div>
- <div class="apiDetail">
- <p>Consume input from the request input buffer.</p>
- <dl><dt><b>Description</b>:</dt><dd>This is called by handlers when consuming data from the request input buffer. This call updates the input service pointers and compacts the input buffer if required.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">nbytes</td><td>Number of bytes the handler has consumed from the input buffer.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga762ed53bab0974c82bfa0fdcef22580d"></a>
- <div class="api">
- <div class="prototype">
- char *
- websDecode64
- (char *str)
- </div>
- <div class="apiDetail">
- <p>Decode the string using base-64 encoding.</p>
- <dl><dt><b>Description</b>:</dt><dd>This modifies the original string.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to decode.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The original string. Caller must not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga3b21883f613ad05e48a9de43714bf67e"></a>
- <div class="api">
- <div class="prototype">
- char *
- websDecode64Block
- (char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> *len, int flags)
- </div>
- <div class="apiDetail">
- <p>Decode a block using base-46 encoding.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to decode. The string must be null terminated.</td>
- <tr><td class="param">len</td><td>Reference to an integer holding the length of the decoded string.</td>
- <tr><td class="param">flags</td><td>Reserved.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gab121f04477c839b0750fb24db5f25d8b"></a>
- <div class="api">
- <div class="prototype">
- void
- websDecodeUrl
- (char *decoded, char *input, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Decode a URL expanding NN encoding.</p>
- <dl><dt><b>Description</b>:</dt><dd>Supports insitu decoding. i.e. Input and output buffers may be the same.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">decoded</td><td>Buffer to hold the decoded URL.</td>
- <tr><td class="param">input</td><td>Input URL or buffer to decode.</td>
- <tr><td class="param">len</td><td>Length of the decoded buffer.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga16df3436fa7bff9179b1d278c24beef5"></a>
- <div class="api">
- <div class="prototype">
- int
- websDefineAction
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, void *fun)
- </div>
- <div class="apiDetail">
- <p>Define an action callback for use with the action handler.</p>
- <dl><dt><b>Description</b>:</dt><dd>The action handler binds a C function to a URI under "/action".</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">name</td><td>URI path suffix. This suffix is added to "/action" to form the bound URI path.</td>
- <tr><td class="param">fun</td><td>Callback function. The signature is void (*WebsAction)(Webs *wp);.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gabfae07af8717f3e8080cc4738db4ae1e"></a>
- <div class="api">
- <div class="prototype">
- int
- websDefineHandler
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442" class="ref">WebsHandlerProc</a> match, <a href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442" class="ref">WebsHandlerProc</a> service, <a href="#group___webs_1gaaf026187015f50b6c6068f996cad29fc" class="ref">WebsHandlerClose</a> close, int flags)
- </div>
- <div class="apiDetail">
- <p>Define a request handler.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">name</td><td>Name of the handler.</td>
- <tr><td class="param">match</td><td>Handler callback match procedure. Invoked to match the request with the handler. The handler should return true to accept the request.</td>
- <tr><td class="param">service</td><td>Handler callback service procedure. Invoked to service each request.</td>
- <tr><td class="param">close</td><td>Handler callback close procedure. Called when GoAhead is shutting down.</td>
- <tr><td class="param">flags</td><td>Set to WEBS_LEGACY_HANDLER to support the legacy handler API calling sequence.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7f4aa0888bf456eab90a010bcbcdb770"></a>
- <div class="api">
- <div class="prototype">
- int
- websDefineJst
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#group___webs_1ga95d129571903557ca1817968430bafd9" class="ref">WebsJstProc</a> fn)
- </div>
- <div class="apiDetail">
- <p>Define a Javscript native function.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine binds a C function to a Javascript function. When the Javascript function is called, the C function is invoked.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">name</td><td>Javascript function name.</td>
- <tr><td class="param">fn</td><td>C function to invoke.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac2af58b7a686cb33e44eb010cf755ce1"></a>
- <div class="api">
- <div class="prototype">
- void
- websDone
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Complete a request.</p>
- <dl><dt><b>Description</b>:</dt><dd>A handler should call <a class="ref" href="#group___webs_1gac2af58b7a686cb33e44eb010cf755ce1">websDone()</a> to complete the request.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga97f5bcd7b8aa8df838037f9cf2c55267"></a>
- <div class="api">
- <div class="prototype">
- char *
- websEncode64
- (char *str)
- </div>
- <div class="apiDetail">
- <p>Encode a string using base-64 encoding.</p>
- <dl><dt><b>Description</b>:</dt><dd>The string is encoded insitu.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to encode.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga01aac3c460b2484e8f26f147e993846e"></a>
- <div class="api">
- <div class="prototype">
- char *
- websEncode64Block
- (char *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Encode a block using base-64 encoding.</p>
- <dl><dt><b>Description</b>:</dt><dd>The string is encoded insitu.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to encode.</td>
- <tr><td class="param">len</td><td>Length of string to encode.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The original string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac898af1d6d0c6cccb905e6a53479b559"></a>
- <div class="api">
- <div class="prototype">
- void
- websError
- (<a href="#group___webs" class="ref">Webs</a> *wp, int code, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Complete a request with an error response.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">code</td><td>HTTP status code.</td>
- <tr><td class="param">fmt</td><td>Message printf style format.</td>
- <tr><td class="param">...</td><td>Format args.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga36a32239715d1f4eedff518aa81542ba"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websErrorMsg
- (int code)
- </div>
- <div class="apiDetail">
- <p>Get a message for a HTTP status code.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">code</td><td>HTTP status code.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Http status message. Caller must not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga22d0cc25b40e3a8039b9c62da85661bd"></a>
- <div class="api">
- <div class="prototype">
- char *
- websEscapeHtml
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Escape unsafe characters in a string.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to escape.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>An allocated block containing the escaped string. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf24cee2f9e39e20e09e73067b8b5b072"></a>
- <div class="api">
- <div class="prototype">
- void
- websFileOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open and initialize the file handler.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga6525ac98afd32c69fd0a7985c0b87f5f"></a>
- <div class="api">
- <div class="prototype">
- int
- websFlush
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)
- </div>
- <div class="apiDetail">
- <p>Flush buffered transmit data and compact the transmit buffer to make room for more data.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call initiates sending buffered data. If blocking mode is selected via the block parameter, this call will wait until all the data has been sent to the O/S for transmission to the client. If block is false, the flush will be initiated and the call will return immediately without blocking.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">block</td><td>Set to true to wait for all data to be written to the socket. Set to false to write whatever the socket can absorb without blocking.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>-1 for I/O errors. Return zero if there is more data remaining in the buffer. Return 1 if the contents of the transmit buffer are fully written and the buffer is now empty.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga34a9c871eaf4cba49ff81174318af979"></a>
- <div class="api">
- <div class="prototype">
- void
- websFree
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Free the webs request object.</p>
- <dl><dt><b>Description</b>:</dt><dd>Callers should call websDone to complete requests prior to invoking websFree.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga54bd8e9073aca8fe5ac527e0b26ae738"></a>
- <div class="api">
- <div class="prototype">
- void
- websFreeUpload
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Free file upload data structures.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga3d2d9787c3fd3b4338ae0a6995fbb338"></a>
- <div class="api">
- <div class="prototype">
- void
- websFsClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the file system module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga0014f224e979be944998d31c4faad46f"></a>
- <div class="api">
- <div class="prototype">
- int
- websFsOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the file system module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4ac722a8a552f9740ad97de6f23891a4"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetBackground
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the background execution flag.</p>
- <dl><dt><b>Description</b>:</dt><dd>If GoAhead is invoked with <ndash/>background, it will run as a daemon in the background.</dd></dl>
- <dl><dt>Returns:</dt><dd>True if GoAhead is running in the background.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga1dd8b54372cecf50a6773639ca10de8b"></a>
- <div class="api">
- <div class="prototype">
- char *
- websGetCgiCommName
- (void )
- </div>
- <div class="apiDetail">
- <p>Get a unique temporary filename for CGI communications.</p>
- <dl><dt>Returns:</dt><dd>Allocated filename string. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga0c1129a2e6d2ab25749ce6434cf06917"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetCookie
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request cookie if supplied.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Cookie string if defined, otherwise null. Caller must not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8d082538c22928173eaf231eece3c2bb"></a>
- <div class="api">
- <div class="prototype">
- char *
- websGetDateString
- (<a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
- </div>
- <div class="apiDetail">
- <p>Get a date as a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>If sbuf is supplied, it is used to calculate the date. Otherwise, the current time is used.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sbuf</td><td>File info object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>An allocated date string. Caller should free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga9cbfca3c673e58c64325460d6e0c5e74"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetDebug
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the debug flag.</p>
- <dl><dt><b>Description</b>:</dt><dd>If GoAhead is invoked with <ndash/>debugger, the debug flag will be set to true.</dd></dl>
- <dl><dt>Returns:</dt><dd>True if GoAhead is running in debug mode.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8ee6d14425afb8eefebf5556ee18c8a2"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetDir
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the base file directory for a request.</p>
- <dl><dt><b>Description</b>:</dt><dd>Returns the request route directory if defined, otherwise returns the documents directory.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Path name string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga2996ca4f6fd53f9b968930add8cf037c"></a>
- <div class="api">
- <div class="prototype">
- char *
- websGetDocuments
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the GoAhead base documents directory.</p>
- <dl><dt><b>Description</b>:</dt><dd>The documents directory is defined at build time and may be overridden by the GoAhead command line.</dd></dl>
- <dl><dt>Returns:</dt><dd>Path string for the documents directory.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga2666ed7d6a56c3014d5ceb076cff0567"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetEof
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request EOF status.</p>
- <dl><dt><b>Description</b>:</dt><dd>The request EOF status is set to true when all the request body (POST|PUT) data has been received.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if all the request body data has been received.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae8b669809d9cba59ef7b77ec5b754dc0"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetExt
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request URI extension.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The URI filename extension component. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga1d34d561f81d6f9ad69244a06d6e38cf"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetFilename
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request filename.</p>
- <dl><dt><b>Description</b>:</dt><dd>The URI is mapped to a filename by decoding and prepending with the request directory.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Filename string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga3d13a47ed8ee3f9a3126f51ae1b9d620"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetHost
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request host.</p>
- <dl><dt><b>Description</b>:</dt><dd>The request host is set to the Host HTTP header value if it is present. Otherwise it is set to the request URI hostname.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Host string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gabfdcb79258d04eaa6912393d155eab6c"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetIfaddr
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request interface address.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Network interface string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga37e0f4bfb4dc0bfaf554863df437ece6"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetIndex
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the default index document name.</p>
- <dl><dt><b>Description</b>:</dt><dd>The default index is "index.html" and can be updated via websSetIndex.</dd></dl>
- <dl><dt>Returns:</dt><dd>Index name string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga2746a02538e42a71d4ef272a9971f986"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetLogLevel
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the current trace log level.</p>
- <dl><dt>Returns:</dt><dd>Number between 0 and 9.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga899fcb60a5afe215e7c56bc1f3c00961"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetMethod
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request method.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>HTTP method string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf36ce4de6a4772ed13ef1f6073d9cb7a"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetPassword
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request password.</p>
- <dl><dt><b>Description</b>:</dt><dd>The request password may be encoded depending on the authentication scheme. See wp->encoded to test if it is encoded.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Password string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4c8b947cea7d8077f51d023aec7cd603"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetPath
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request path.</p>
- <dl><dt><b>Description</b>:</dt><dd>The URI path component excludes the http protocol, hostname, port, reference and query components. It always beings with "/".</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Request path string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaee772cdbaee60ec39567c47e9a83c2c6"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetPort
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request TCP/IP port.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>TCP/IP Port integer.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaa18fd6e345dee2e99c47f02471978177"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetProtocol
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request HTTP protocol.</p>
- <dl><dt><b>Description</b>:</dt><dd>This will be set to either "http" or "https".</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Protocol string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gafae1ecad7c3b1a2bfe452cbab8025ab1"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetQuery
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request query component.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Request query string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4968ce8b1e8a6fe330b1bf78bb77e278"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetServer
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the server host name.</p>
- <dl><dt>Returns:</dt><dd>Host name string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga999c5adc0501b4c00414caa8baaf6230"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetServerAddress
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the server IP address.</p>
- <dl><dt>Returns:</dt><dd>Server IP address string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gab976a367d9cecfef956869e053328862"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetServerAddressUrl
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the server IP address with port number.</p>
- <dl><dt>Returns:</dt><dd>Server IP:PORT address string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf852b66707400fa0cf172a72731893ce"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetServerUrl
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the server host name with port number.</p>
- <dl><dt>Returns:</dt><dd>Host name string with port number. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga972f7fc60c236c0e4e6ea7e325096b73"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetUrl
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request URI.</p>
- <dl><dt><b>Description</b>:</dt><dd>This returns the request URI. This may be modified if the request is rewritten via websRewrite.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>URI string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga78e094c02b19ce4de8d7c8b62f05be18"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetUserAgent
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the client User-Agent HTTP header.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>User-Agent string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga46696bd6220b11d9e7edf516cd17e578"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetUsername
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the request username.</p>
- <dl><dt><b>Description</b>:</dt><dd>If the request is authenticated, this call returns the username supplied during authentication.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Username string if defined, otherwise null. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4cd0530612a92dde9042c030c369e7d8"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)
- </div>
- <div class="apiDetail">
- <p>Get a request variable.</p>
- <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Variable name.</td>
- <tr><td class="param">defaultValue</td><td>Default value to return if the variable is not defined.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Variable value string. Caller should not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga75e53757d82543b1b27797967c0aefb6"></a>
- <div class="api">
- <div class="prototype">
- int
- websJstOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the Javascript module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga88501f83c58a6ea9dc8fd14974db9130"></a>
- <div class="api">
- <div class="prototype">
- int
- websJstWrite
- (int jid, <a href="#group___webs" class="ref">Webs</a> *wp, int argc, char **argv)
- </div>
- <div class="apiDetail">
- <p>Write data to the response.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">jid</td><td>Javascript ID handle.</td>
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">argc</td><td>Count of arguments.</td>
- <tr><td class="param">argv</td><td>Array arguments.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaa883a6d5dfe21e9ae5fd6f1bae2b72c9"></a>
- <div class="api">
- <div class="prototype">
- int
- websListen
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint)
- </div>
- <div class="apiDetail">
- <p>Listen on a TCP/IP address endpoint.</p>
- <dl><dt><b>Description</b>:</dt><dd>The URI is mapped to a filename by decoding and prepending with the request directory. For IPv6 addresses, use the format: [aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii]:port.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">endpoint</td><td>IPv4 or IPv6 address on which to listen.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Positive integer holding a Socket ID handle if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga24336820ff761ed13dd23341a9b86ed5"></a>
- <div class="api">
- <div class="prototype">
- char *
- websMD5
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Get an MD5 digest of a string.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to analyze.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Allocated MD5 checksum. Caller should free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga06c3e0f9f7351e1127d21ff3713df104"></a>
- <div class="api">
- <div class="prototype">
- char *
- websMD5Block
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
- </div>
- <div class="apiDetail">
- <p>Get an MD5 digest of a block and optionally prepend a prefix.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">buf</td><td>Block to analyze.</td>
- <tr><td class="param">length</td><td>Length of block.</td>
- <tr><td class="param">prefix</td><td>Optional prefix to prepend to the MD5 sum.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Allocated MD5 checksum. Caller should free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8f14fc6ef969671a37ed65acc154a57f"></a>
- <div class="api">
- <div class="prototype">
- char *
- websNormalizeUriPath
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
- </div>
- <div class="apiDetail">
- <p>Normalize a URI path.</p>
- <dl><dt><b>Description</b>:</dt><dd>This removes "./", "../" and redundant separators.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>URI path to normalize.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>An allocated normalized URI path. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga3b5c4de81f247a9faf225c636ec8c79f"></a>
- <div class="api">
- <div class="prototype">
- void
- websNoteRequestActivity
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Take not of the request activity and mark the time.</p>
- <dl><dt><b>Description</b>:</dt><dd>This is used to defer the request timeout whenever there is request I/O activity.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga1cedecd14d83cdd8dcbffceb8b51791c"></a>
- <div class="api">
- <div class="prototype">
- int
- websOpen
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *routes)
- </div>
- <div class="apiDetail">
- <p>Open the web server.</p>
- <dl><dt><b>Description</b>:</dt><dd>This initializes the web server and defines the documents directory.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">documents</td><td>Optional web documents directory. If set to null, the build time ME_GOAHEAD_DOCUMENTS value is used for the documents directory.</td>
- <tr><td class="param">routes</td><td>Optional filename for a route configuration file to load. Additional route or authentication configuration files can be loaded via websLoad.</td>
- <tr><td class="param">routes</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga3e3edc47c5f177466de9c3eabe664b88"></a>
- <div class="api">
- <div class="prototype">
- int
- websOpenFile
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, int flags, int mode)
- </div>
- <div class="apiDetail">
- <p>Open the web page document for the current request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>Filename path to open.</td>
- <tr><td class="param">flags</td><td>File open flags.</td>
- <tr><td class="param">mode</td><td>Permissions mask.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Positive file handle if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga690dbbada9274dd35ce9d2a96d981e07"></a>
- <div class="api">
- <div class="prototype">
- int
- websOptionsOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the options handler.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gad56c750456cbcb6bde8f6e28d4ba3989"></a>
- <div class="api">
- <div class="prototype">
- void
- websOsClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the O/S dependent code.</p>
- <dl><dt><b>Description</b>:</dt><dd>Called from websClose.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gada39f22333835280a7be57bd1770aef1"></a>
- <div class="api">
- <div class="prototype">
- int
- websOsOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the O/S dependent code.</p>
- <dl><dt><b>Description</b>:</dt><dd>Called from websOpen.</dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga42ac8fd2d43cd62e36de672897476033"></a>
- <div class="api">
- <div class="prototype">
- void
- websPageClose
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Close the document page.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae3a5d48960ff548b64372bf79d151801"></a>
- <div class="api">
- <div class="prototype">
- int
- websPageIsDirectory
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Test if the document page for the request corresponds to a directory.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the filename is a directory.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga550a444cd6c8991eef437ece0cff386a"></a>
- <div class="api">
- <div class="prototype">
- int
- websPageOpen
- (<a href="#group___webs" class="ref">Webs</a> *wp, int mode, int perms)
- </div>
- <div class="apiDetail">
- <p>Open a web page document for a request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">mode</td><td>File open mode. Select from O_RDONLY and O_BINARY. Rom files systems ignore this argument.</td>
- <tr><td class="param">perms</td><td>Ignored.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>File handle if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga412045a224b12fad35f3ccb0eba21309"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websPageReadData
- (<a href="#group___webs" class="ref">Webs</a> *wp, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Read data from the request page document.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">buf</td><td>Buffer for the read data.</td>
- <tr><td class="param">size</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gade99dac2cc10314deb754833298fc3af"></a>
- <div class="api">
- <div class="prototype">
- void
- websPageSeek
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)
- </div>
- <div class="apiDetail">
- <p>Seek to a position in the request page document.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">offset</td><td>Offset of location in the file to seek to. This is relative to the specified origin.</td>
- <tr><td class="param">origin</td><td>Set to SEEK_CUR, SEEK_SET or SEEK_END to position relative to the current position, beginning or end of the document.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gafa581d664b5cc3eacc073d1a5d113d7a"></a>
- <div class="api">
- <div class="prototype">
- int
- websPageStat
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
- </div>
- <div class="apiDetail">
- <p>Get file status for the current request document.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">sbuf</td><td>File information structure to modify with file status.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac893e2749beee259505e673c4e551f04"></a>
- <div class="api">
- <div class="prototype">
- int
- websParseDateTime
- (<a href="#goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae" class="ref">WebsTime</a> *time, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *date, struct tm *defaults)
- </div>
- <div class="apiDetail">
- <p>Parse a date/time string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Try to intelligently parse a date. This is a tolerant parser. It is not validating and will do its best to parse any possible date string. Supports the following date/time formats: <br/><br/>
- ISO dates: 2009-05-21t16:06:05.000z <br/><br/>
- Date: 07/28/2014, 07/28/08, Jan/28/2014, Jaunuary-28-2014, 28-jan-2014. <br/><br/>
- Support date order: dd/mm/yy, mm/dd/yy and yyyy/mm/dd <br/><br/>
- Support separators "/", ".", "-" <br/><br/>
- Timezones: GMT|UTC[+-]NN[:]NN <br/><br/>
- Time: 10:52[:23] <br/><br/></dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">time</td><td>Reference to a.</td>
- <tr><td class="param">date</td><td>Date/time string to parse.</td>
- <tr><td class="param">defaults</td><td>Optionally supply missing components for the date/time. Set to NULL if not used.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga0853e59f6f1dba6c94c8d3d659106e7f"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websProcessCgiData
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Process CGI request body data.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if processing the request can proceed.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gabf36424ddd2ef63ac20fc1419debc90e"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websProcessUploadData
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Process upload data for form, multipart mime file upload.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if processing the request can proceed.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf8cbf1876923de6cacc9654cb89692dd"></a>
- <div class="api">
- <div class="prototype">
- void
- websPump
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Pump the state machine.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine will advance the connection state machine in response to events.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga648cc4a4536a44aefcffaa091b3ea37f"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websReadFile
- (int fd, char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Read data from an open file.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
- <tr><td class="param">buf</td><td>Buffer for the read data.</td>
- <tr><td class="param">size</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gab71f9da6c9f523bd6486fa9e2065cb5b"></a>
- <div class="api">
- <div class="prototype">
- char *
- websReadWholeFile
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
- </div>
- <div class="apiDetail">
- <p>Read all the data from a file.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>File path to read from.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>An allocated buffer containing the file data with an appended null. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga71919fc188e9b1f7130891b22181abd4"></a>
- <div class="api">
- <div class="prototype">
- void
- websRedirect
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)
- </div>
- <div class="apiDetail">
- <p>Redirect the client to a new URL.</p>
- <dl><dt><b>Description</b>:</dt><dd>This creates a response to the client with a Location header directing the client to a new location. The response uses a 302 HTTP status code.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">url</td><td>URL to direct the client to.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga2071f8d94ddff6c2143caeca98e4b28d"></a>
- <div class="api">
- <div class="prototype">
- int
- websRedirectByStatus
- (<a href="#group___webs" class="ref">Webs</a> *wp, int status)
- </div>
- <div class="apiDetail">
- <p>Redirect the client to a new URI.</p>
- <dl><dt><b>Description</b>:</dt><dd>The routing configuration file can define redirection routes for various HTTP status codes. This routine will utilize the appropriate route redirection based on the request route and specified status code.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">status</td><td>HTTP status code to use in selecting the route redirection.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gab0e25f7d5e2ab92116e94a3d2f0e6712"></a>
- <div class="api">
- <div class="prototype">
- void
- websResponse
- (<a href="#group___webs" class="ref">Webs</a> *wp, int status, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *msg)
- </div>
- <div class="apiDetail">
- <p>Create and send a request response.</p>
- <dl><dt><b>Description</b>:</dt><dd>This creates a response for the current request using the specified HTTP status code and the supplied message.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">status</td><td>HTTP status code.</td>
- <tr><td class="param">msg</td><td>Response message body.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga5a766509244081e0f76bc70479b2a912"></a>
- <div class="api">
- <div class="prototype">
- int
- websRewriteRequest
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url)
- </div>
- <div class="apiDetail">
- <p>Rewrite a request.</p>
- <dl><dt><b>Description</b>:</dt><dd>Handlers may choose to not process a request but rather rewrite requests and then reroute.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">url</td><td>New request URL.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaa36f628a3e14fe08420597095f0f74c2"></a>
- <div class="api">
- <div class="prototype">
- void
- websRuntimeClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the runtime code.</p>
- <dl><dt><b>Description</b>:</dt><dd>Called from websClose.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4d8e96f6b4a072ca8cadda04912a669e"></a>
- <div class="api">
- <div class="prototype">
- int
- websRuntimeOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the runtime code.</p>
- <dl><dt><b>Description</b>:</dt><dd>Called from websOpen.</dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaca0e8d193f5ad1592e7945ac95d9d96e"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a>
- websSeekFile
- (int fd, <a href="#goahead_8h_1a7bac74916a564105339bcd5a9323c366" class="ref">Offset</a> offset, int origin)
- </div>
- <div class="apiDetail">
- <p>Seek to a position in the current request page document.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
- <tr><td class="param">offset</td><td>Location in the file to seek to.</td>
- <tr><td class="param">origin</td><td>Set to SEEK_CUR, SEEK_SET or SEEK_END to position relative to the current position, beginning or end of the document.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae1e0fc3c37a3050a6da804a42637b32e"></a>
- <div class="api">
- <div class="prototype">
- int
- websServer
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *endpoint, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *documents)
- </div>
- <div class="apiDetail">
- <p>One line embedding API.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call will also open auth.txt and route.txt for authentication and routing configuration.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">endpoint</td><td>IP:PORT address on which to listen.</td>
- <tr><td class="param">documents</td><td>Directory containing web documents to serve.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga81d8a2cfbe5360e1a46011172470368a"></a>
- <div class="api">
- <div class="prototype">
- void
- websServiceEvents
- (int *finished)
- </div>
- <div class="apiDetail">
- <p>Service I/O events until finished.</p>
- <dl><dt><b>Description</b>:</dt><dd>This will wait for socket events and service those until *finished is set to true.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">finished</td><td>Integer location to test. If set to true, then exit. Note: setting finished will not automatically wake up the service routine.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaed3bf51e30277fe1b56379bb6a1b6699"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetBackground
- (int on)
- </div>
- <div class="apiDetail">
- <p>Set the background processing flag.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">on</td><td>Value to set the background flag to.</td>
- </table></dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga628ad13f465a4c67339e2b53540ad01a"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetCookie
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *domain, int lifespan, int flags)
- </div>
- <div class="apiDetail">
- <p>Define a cookie to include in the response.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Cookie name.</td>
- <tr><td class="param">value</td><td>Cookie value.</td>
- <tr><td class="param">path</td><td>URI path prefix applicable for this cookie.</td>
- <tr><td class="param">domain</td><td>Domain applicable for this cookie.</td>
- <tr><td class="param">lifespan</td><td>Cookie lifespan in seconds.</td>
- <tr><td class="param">flags</td><td>Set to WEBS_COOKIE_SECURE for https only. Set to WEBS_COOKIE_HTTP for http only. Otherwise the cookie applies to both http and https requests. Or in WEBS_COOKIE_SAME_LAX for SameSite=Lax and WEBS_COOKIE_SAME_STRICT for SameSite=Strict.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae3b839fa0c223b457f109c61c177da96"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetDebug
- (int on)
- </div>
- <div class="apiDetail">
- <p>Set the debug processing flag.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">on</td><td>Value to set the debug flag to.</td>
- </table></dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf0802eca30adb2cc9d2b7d2ccc2badc6"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetDocuments
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir)
- </div>
- <div class="apiDetail">
- <p>Set the web documents directory.</p>
- <dl><dt><b>Description</b>:</dt><dd>The web documents directory is used when resolving request URIs into filenames.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">dir</td><td>Directory path to use.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga01f49a8761bd89203fa493a79a821e56"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetEnv
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Create the CGI environment variables for the current request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gacba78b1a19ef4ddade76807333243d5c"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetFormVars
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Create request variables for query and POST body data.</p>
- <dl><dt><b>Description</b>:</dt><dd>This creates request variables if the request is a POST form (has a Content-Type of application/x-www-form-urlencoded). The POST body data is consumed from the input buffer.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga826854eb79f23630f7f7905ccf862976"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetHost
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host)
- </div>
- <div class="apiDetail">
- <p>Define the host name for the server.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">host</td><td>String host name.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga346178ebf1361d67acab6a62ff15adc2"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetIndex
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *filename)
- </div>
- <div class="apiDetail">
- <p>Create and send a request response.</p>
- <dl><dt><b>Description</b>:</dt><dd>This creates a response for the current request using the specified HTTP status code and the supplied message.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">filename</td><td>Web document name to use as the index. This should not contain any directory components.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7528ade178ede9cd6fe6abe011869dc1"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetIpAddr
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipaddr)
- </div>
- <div class="apiDetail">
- <p>Define the host IP address.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">ipaddr</td><td>Host IP address.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga46d153b401bb7fc47ae5b17203541644"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetLogLevel
- (int level)
- </div>
- <div class="apiDetail">
- <p>Set the current trace log level.</p>
- <dl><dt>Returns:</dt><dd>Number between 0 and 9.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga9b7ae14718f40340d9621529f4587548"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetQueryVars
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Create request variables for query string data.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetStatus
- (<a href="#group___webs" class="ref">Webs</a> *wp, int status)
- </div>
- <div class="apiDetail">
- <p>Set the response HTTP status code.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">status</td><td>HTTP status code.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga999bb54215bbc7d71c7d6e828fcf49c8"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetTxLength
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length)
- </div>
- <div class="apiDetail">
- <p>Set the response body content length.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">length</td><td>Length value to use.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7bc119287019bd62d1db463ea72505b5"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- websSetVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
- </div>
- <div class="apiDetail">
- <p>Set a request variable to a string value.</p>
- <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Variable name to set.</td>
- <tr><td class="param">value</td><td>Value to set.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The allocated WebsKey.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gae224484206da359d0c9e0a11469d4b4f"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- websSetVarFmt
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Set a request variable to a formatted string value.</p>
- <dl><dt><b>Description</b>:</dt><dd>Request variables are defined for HTTP headers of the form HTTP_*. Some request handlers also define their own variables. For example: CGI environment variables.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Variable name to set.</td>
- <tr><td class="param">fmt</td><td>Value format string.</td>
- <tr><td class="param">...</td><td>Args to format.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The allocated WebsKey.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga040b642a888cc259456bacfec4227217"></a>
- <div class="api">
- <div class="prototype">
- int
- websStatFile
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path, <a href="#struct_webs_file_info" class="ref">WebsFileInfo</a> *sbuf)
- </div>
- <div class="apiDetail">
- <p>Get file status for a file.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>Filename path.</td>
- <tr><td class="param">sbuf</td><td>File information structure to modify with file status.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7c1b3749d9f6644db2c7a60d44c453db"></a>
- <div class="api">
- <div class="prototype">
- char *
- websTempFile
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
- </div>
- <div class="apiDetail">
- <p>Create a temporary filename This does not guarantee the filename is unique or that it is not already in use by another application.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">dir</td><td>Directory to locate the temp file. Defaults to the O/S default temporary directory (usually /tmp).</td>
- <tr><td class="param">prefix</td><td>Filename prefix.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>An allocated filename string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gab42afeb8b16720903e8289fcb9c072ba"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websTestVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Test if a request variable is defined.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Variable name.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the variable is defined.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gafc3db65ebb5f3a86ec0e3ccde56c1f31"></a>
- <div class="api">
- <div class="prototype">
- void
- websTimeClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the date/time parsing module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga4a94586b4fdeb3c91b1555c3d70151a0"></a>
- <div class="api">
- <div class="prototype">
- int
- websTimeOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the date/time parsing module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8c080d18fb0f34cb68759bce48eac7d9"></a>
- <div class="api">
- <div class="prototype">
- int
- websUrlParse
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *url, char **buf, char **protocol, char **host, char **port, char **path, char **ext, char **reference, char **query)
- </div>
- <div class="apiDetail">
- <p>Parse a URL into its components.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">url</td><td>URL to parse.</td>
- <tr><td class="param">buf</td><td>Buffer to hold storage for various parsed components. Caller must free. NOTE: the parsed components may point to locations in this buffer.</td>
- <tr><td class="param">protocol</td><td>Parsed URL protocol component.</td>
- <tr><td class="param">host</td><td>Parsed hostname.</td>
- <tr><td class="param">port</td><td>Parsed URL port.</td>
- <tr><td class="param">path</td><td>Parsed URL path component.</td>
- <tr><td class="param">ext</td><td>Parsed URL extension.</td>
- <tr><td class="param">reference</td><td>Parsed URL reference portion (#reference).</td>
- <tr><td class="param">query</td><td>Parsed URL query component.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaebff2db9e8b7a70579082cf92593bcfe"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websValid
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Test if a webs object is valid.</p>
- <dl><dt><b>Description</b>:</dt><dd>After calling websDone, the websFree routine will have been called and the memory for the webs object will be released. Call websValid to test a Webs object for validity.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the webs object is still valid and the request has not been completed.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaf2f303661dab21b74f2ed7c88d741486"></a>
- <div class="api">
- <div class="prototype">
- char *
- websValidateUriPath
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
- </div>
- <div class="apiDetail">
- <p>Validate a URI path as expected in a HTTP request line.</p>
- <dl><dt><b>Description</b>:</dt><dd>This expects a URI beginning with "/" and containing only valid URI characters. The URI is decoded, and normalized removing "../" and "." segments. The URI must begin with a "/" both before and after decoding and normalization.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">uri</td><td>URI to validate.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>A validated, normalized URI path. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gafd15ff2fac3a34650837fec69124b2a2"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websValidUriChars
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
- </div>
- <div class="apiDetail">
- <p>Test if a URI is using only valid characters Note this does not test if the URI is fully legal.</p>
- Some components of the URI have restricted character sets that this routine does not test. This tests if the URI has only characters valid to use in a URI before decoding. i.e. It will permit NN encodings. The set of valid characters is: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~:/?#[]@!$&'()*+,;=%"
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">uri</td><td>Uri to test.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the URI string is comprised of legal URI characters.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gac41407ff97f138db72108cb142258f5e"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websWrite
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Write data to the response.</p>
- <dl><dt><b>Description</b>:</dt><dd>The data is buffered and will be sent to the client when the buffer is full or websFlush is called.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">fmt</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Arguments to the format string.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes written.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga9b63519c49d00fae1e06b2c918f970f7"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websWriteBlock
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Write a block of data to the response.</p>
- <dl><dt><b>Description</b>:</dt><dd>The data is buffered and will be sent to the client when the buffer is full or websFlush is called. This routine will never return "short", it will always write all the data unless there are errors.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">buf</td><td>Buffer of data to write.</td>
- <tr><td class="param">size</td><td>Length of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes written or -1. This will always equal size if there are no errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga7b3fddd74796c79f7e41e8bd9ce107a4"></a>
- <div class="api">
- <div class="prototype">
- void
- websWriteEndHeaders
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Signify the end of the response headers.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call concludes the response headers and writes a blank line to the response.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gadd0a77daf2fd10766c587c179b09081e"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websWriteFile
- (int fd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Write data to the open file.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">fd</td><td>Open file handle returned by websOpenFile.</td>
- <tr><td class="param">buf</td><td>Buffer for the read data.</td>
- <tr><td class="param">size</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes read if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga34f4159f41e89e67c22a8767d6cd98bb"></a>
- <div class="api">
- <div class="prototype">
- int
- websWriteHeader
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Write a response header.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine writes a response header. It should be invoked after calling websWriteHeaders to write the standard headers and before websWriteEndHeaders. This routine differs from websWrite in that it traces header values to the log.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">key</td><td>Header key value.</td>
- <tr><td class="param">fmt</td><td>Header value format string.</td>
- <tr><td class="param">...</td><td>Arguments to the format string.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga174c1184ac25621b34337fe47e3be7d6"></a>
- <div class="api">
- <div class="prototype">
- void
- websWriteHeaders
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> contentLength, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *redirect)
- </div>
- <div class="apiDetail">
- <p>Write a set of standard response headers.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">contentLength</td><td>Value for the Content-Length header which describes the length of the response body.</td>
- <tr><td class="param">redirect</td><td>Value for the Location header which redirects the client to a new URL.</td>
- </table></dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_1gaef03eccfb6f0d42b34f1a7a90bac62b6" class="ref">websSetStatus</a></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga8712767b916c5e7a281760ee5d0cbb12"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- websWriteSocket
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Write a block of data to the network.</p>
- <dl><dt><b>Description</b>:</dt><dd>This bypassed output buffering and is the lowest level write.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">buf</td><td>Buffer of data to write.</td>
- <tr><td class="param">size</td><td>Length of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes written. May be less than len if the socket is in non-blocking mode. Returns -1 for errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and errno will be set to EAGAIN or EWOULDBLOCK.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <h1>WebsAuth</h1>
- <a name="group___webs_auth"></a>
- <div class="api">
- <div class="prototype">WebsAuth</div>
- <div class="apiDetail">
- <p>GoAhead Authentication.</p>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga637ac17c1c1d24cafa5589b00e4ef82b"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_role" class="ref">WebsRole</a> *
- websAddRole
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> abilities)
- </div>
- <div class="apiDetail">
- <p>Add a role.</p>
- <dl><dt><b>Description</b>:</dt><dd>The role is added to the list of roles.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">role</td><td>Role name.</td>
- <tr><td class="param">abilities</td><td>Hash of abilities for the role.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The allocated role.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga9aa0a184957878bff4eeaddc8774c96a"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_user" class="ref">WebsUser</a> *
- websAddUser
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)
- </div>
- <div class="apiDetail">
- <p>Add a user.</p>
- <dl><dt><b>Description</b>:</dt><dd>The user is added to the list of users.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">username</td><td>User name.</td>
- <tr><td class="param">password</td><td>User password (encrypted).</td>
- <tr><td class="param">roles</td><td>Space separated list of roles. This may also contain abilities.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>User object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga2e7099150ce40f126e53901b37055164"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websAuthenticate
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Authenticate a user.</p>
- <dl><dt><b>Description</b>:</dt><dd>The user is authenticated if required by the selected request route.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the route does not require authentication or the user is authenticated successfully.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga4b9213d33c030e357c81a97765a83ab3"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websCan
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> ability)
- </div>
- <div class="apiDetail">
- <p>Test if a user possesses the required ability.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">ability</td><td>Set of required abilities.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the user has the required ability.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gafd247c60a4a156f514fae54aba5c95af"></a>
- <div class="api">
- <div class="prototype">
- void
- websCloseAuth
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the authentication module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga4d6532cddbf3407711d240f6d2591bc9"></a>
- <div class="api">
- <div class="prototype">
- void
- websComputeAllUserAbilities
- (void )
- </div>
- <div class="apiDetail">
- <p>Compute the abilities for all users by resolving roles into abilities.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gac59e51db50106639503b066a95258b75"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c" class="ref">WebsVerify</a>
- websGetPasswordStoreVerify
- (void )
- </div>
- <div class="apiDetail">
- <p>Set the password store verify callback.</p>
- <dl><dt>Returns:</dt><dd>Verify WebsVerify callback function.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gac4ce05bc63317ae4689e42b0bba4f6b7"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
- websGetRoles
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the roles hash.</p>
- <dl><dt>Returns:</dt><dd>The roles hash object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gad3d4ca84a25b0efea6d8aca2bf3784d5"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
- websGetUsers
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the users hash.</p>
- <dl><dt>Returns:</dt><dd>The users hash object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga0359ac96f9112adc03baa0ed6d4740d6"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websLoginUser
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)
- </div>
- <div class="apiDetail">
- <p>Login a user by verifying the login credentials.</p>
- <dl><dt><b>Description</b>:</dt><dd>This may be called by handlers to manually authenticate a user.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">username</td><td>User name.</td>
- <tr><td class="param">password</td><td>User password (encrypted).</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the user can be authenticated.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga2ce714b242d8f8d184daaa82eadb1aaf"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websLogoutUser
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Logout a user and remove the user login session.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga3ebda5094fd5aaf033c0a01f666db5e2"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_user" class="ref">WebsUser</a> *
- websLookupUser
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username)
- </div>
- <div class="apiDetail">
- <p>Lookup if a user exists.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">username</td><td>User name to search for.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>User object or null if the user cannot be found.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga7653f9dcb2904cd3632b019273c02ade"></a>
- <div class="api">
- <div class="prototype">
- int
- websOpenAuth
- (int minimal)
- </div>
- <div class="apiDetail">
- <p>Open the authentication module.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">minimal</td><td>Reserved. Set to zero.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the user has the required ability.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga19bedf7e54b1993a08f2f6e7ae7dea9c"></a>
- <div class="api">
- <div class="prototype">
- int
- websRemoveRole
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *role)
- </div>
- <div class="apiDetail">
- <p>Remove a role from the system.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">role</td><td>Role name.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gaada9cd540cd4c0f488c0acfa1558d4fd"></a>
- <div class="api">
- <div class="prototype">
- int
- websRemoveUser
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Remove a user from the system.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">name</td><td>User name.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gac050abeadb21db4a90197eab284b115b"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetPasswordStoreVerify
- (<a href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c" class="ref">WebsVerify</a> verify)
- </div>
- <div class="apiDetail">
- <p>Set the password store verify callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">verify</td><td>WebsVerify callback function.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gabf304efa46ec70b19997a6587344c6d1"></a>
- <div class="api">
- <div class="prototype">
- int
- websSetUserPassword
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password)
- </div>
- <div class="apiDetail">
- <p>Set a password for the user.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">username</td><td>User name.</td>
- <tr><td class="param">password</td><td>Null terminated password string.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gad77d33b025ea6680b2172f2dac62639b"></a>
- <div class="api">
- <div class="prototype">
- int
- websSetUserRoles
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *username, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *roles)
- </div>
- <div class="apiDetail">
- <p>Define the set of roles for a user.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">username</td><td>User name.</td>
- <tr><td class="param">roles</td><td>Space separated list of roles or abilities.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1ga85dd3dca55f2cba94bd02ac206acb70f"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websVerifyPasswordFromCustom
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>User password verification routine from a custom password back-end store.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the user password verifies.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_auth_1gacf13eed5b4f7dff570f75098a1e34923"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websVerifyPasswordFromFile
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>User password verification routine from auth.txt.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the user password verifies.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <h1>WebsBuf</h1>
- <a name="group___webs_buf"></a>
- <div class="api">
- <div class="prototype">WebsBuf</div>
- <div class="apiDetail">
- <p>A WebsBuf (ring queue) allows maximum utilization of memory for data storage and is ideal for input/output buffering.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">char *</td><td><td>buf</td><td>
- Holding buffer for data.
- </td>
- <tr><td class="param">ssize</td><td><td>buflen</td><td>
- Length of ring queue.
- </td>
- <tr><td class="param">char *</td><td><td>endbuf</td><td>
- Pointer to end of buffer.
- </td>
- <tr><td class="param">char *</td><td><td>endp</td><td>
- Pointer to end of data.
- </td>
- <tr><td class="param">int</td><td><td>increment</td><td>
- Growth increment.
- </td>
- <tr><td class="param">ssize</td><td><td>maxsize</td><td>
- Maximum size.
- </td>
- <tr><td class="param">char *</td><td><td>servp</td><td>
- Pointer to start of data.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga1838678c03f471aed89edfa5db822272"></a>
- <div class="api">
- <div class="prototype">
- void
- bufAddNull
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Add a trailing null to the buffer.</p>
- The end pointer is not changed
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga7fb267b66c30173cf035560028e83eba"></a>
- <div class="api">
- <div class="prototype">
- void
- bufAdjustEnd
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Adjust the endp pointer by the specified size.</p>
- <dl><dt><b>Description</b>:</dt><dd>This is useful after manually copying data into the buffer and needing to adjust the end pointer.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">size</td><td>Size of adjustment. May be positive or negative value.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga89be85c8255bbe0b7a414af5f1587600"></a>
- <div class="api">
- <div class="prototype">
- void
- bufAdjustStart
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
- </div>
- <div class="apiDetail">
- <p>Adjust the start (servp) reference.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">count</td><td>Number of bytes to adjust.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga9ffe6a1664c7911d12e01f317fc18458"></a>
- <div class="api">
- <div class="prototype">
- void
- bufCompact
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Compact the data in the buffer and move to the start of the buffer.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga5acfca7bd6b154817530a4551de9a4a6"></a>
- <div class="api">
- <div class="prototype">
- int
- bufCreate
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, int increment, int maxsize)
- </div>
- <div class="apiDetail">
- <p>Create a buffer.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">increment</td><td>Incremental size to grow the buffer. This will be increased by a power of two each time the buffer grows.</td>
- <tr><td class="param">maxsize</td><td>Maximum size of the buffer.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaf5a93373e65f8a7ccb456eb4bf72bba8"></a>
- <div class="api">
- <div class="prototype">
- void
- bufFlush
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Flush all data in the buffer and reset the pointers.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gacda55401603f555af52faee39639d78c"></a>
- <div class="api">
- <div class="prototype">
- void
- bufFree
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Free allocated storage for the buffer.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaa3a7777b78cd891c746772b5c489fd99"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufGetBlk
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Copy a block of from the buffer and adjust the servp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">blk</td><td>Block into which to place the data.</td>
- <tr><td class="param">len</td><td>Length of the block.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Number of bytes copied.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gafa8400821880a8f4d9f1cad4a9595626"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufGetBlkMax
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Return the maximum number of bytes the buffer can provide via a single block copy.</p>
- <dl><dt><b>Description</b>:</dt><dd>Useful if the user is doing their own data retrieval.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Number of bytes available for copying.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaad216addfbff3e9ecacdf4f4a651ac90"></a>
- <div class="api">
- <div class="prototype">
- int
- bufGetc
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Get a character from the buffer and increment the servp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The next character or -1 if the buffer is empty.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga48fc76d92c206efcfdf3a376f85214dd"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- bufGrow
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> room)
- </div>
- <div class="apiDetail">
- <p>Grow the buffer by at least the required amount of room.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">room</td><td>Available size required after growing the buffer.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the buffer can be grown to have the required amount of room.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaa0ae470cc24e8e57db77e42ffb751b83"></a>
- <div class="api">
- <div class="prototype">
- int
- bufInsertc
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)
- </div>
- <div class="apiDetail">
- <p>Insert a character to the buffer before the servp position and decrement the servp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">c</td><td>Character to insert.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga284f3c18de56b775c0a13f58f78d4744"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufLen
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Get the length of available data in the buffer.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Size of available data in bytes.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga31ab202e1cef11fa44e7232100fc500f"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufPut
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Append a formatted string to the buffer at the endp position and increment the endp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">fmt</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Variable arguments for the format string.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of characters appended. Returns negative if there is an allocation error.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gad14675b48245dc6eaabd6e6da8686a73"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufPutBlk
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Put a block to the buffer.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">blk</td><td>Block to append to the buffer.</td>
- <tr><td class="param">len</td><td>Size of the block.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Length of data appended. Should equal len.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga7c38d63ce718b544ebdb32807a34ca3e"></a>
- <div class="api">
- <div class="prototype">
- int
- bufPutc
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, char c)
- </div>
- <div class="apiDetail">
- <p>Append a character to the buffer at the endp position and increment the endp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">c</td><td>Character to append.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaea6647f6507f65ea81faf7c47e8703e1"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> ssize
- ssize bufPutStr
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Append a string to the buffer at the endp position and increment the endp.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- <tr><td class="param">str</td><td>String to append.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of characters appended. Returns negative if there is an allocation error.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1gaa1f359ca367a6f72ebaa4b4028732333"></a>
- <div class="api">
- <div class="prototype">
- void
- bufReset
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Reset the buffer pointers to the start of the buffer if empty.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga2ffac4a06b33a774a59e0441bbf0a555"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- bufRoom
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Determine the room available in the buffer.</p>
- <dl><dt><b>Description</b>:</dt><dd>This returns the maximum number of bytes the buffer can absorb in a single block copy.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Number of bytes of available space.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_buf_1ga62f58e280d1d6706e8eb0637963f658e"></a>
- <div class="api">
- <div class="prototype">
- char *
- bufStart
- (<a href="#group___webs_buf" class="ref">WebsBuf</a> *bp)
- </div>
- <div class="apiDetail">
- <p>Get a reference to the start of buffer data.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">bp</td><td>Buffer reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>A string pointer.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <h1>WebsHash</h1>
- <a name="goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67"></a>
- <div class="api">
- <div class="prototype">WebsHash</div>
- <div class="apiDetail">
- <p>Hash table entry structure.</p>
- <dl><dt><b>Description</b>:</dt><dd>The hash structure supports growable hash tables with high performance, collision resistant hashes. Each hash entry has a descriptor entry. This is used to manage the hash table link chains.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1ga38965650a2f6f2666e0120498594a135"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
- hashCreate
- (int size)
- </div>
- <div class="apiDetail">
- <p>Create a hash table.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">size</td><td>Minimum size of the hash index.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Hash table ID. Negative if the hash cannot be created.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b"></a>
- <div class="api">
- <div class="prototype">
- int
- hashDelete
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Delete a key by name.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- <tr><td class="param">name</td><td>Key name to delete.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if the delete was successful. Otherwise -1 if the key was not found.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- hashEnter
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="#struct_webs_value" class="ref">WebsValue</a> value, int arg)
- </div>
- <div class="apiDetail">
- <p>Enter a new key and value into the hash table.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- <tr><td class="param">name</td><td>Key name to create.</td>
- <tr><td class="param">value</td><td>Key value to enter.</td>
- <tr><td class="param">arg</td><td>Optional extra argument to store with the value.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the WebKey object storing the key and value.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- hashFirst
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id)
- </div>
- <div class="apiDetail">
- <p>Start walking the hash keys by returning the first key entry in the hash.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the first WebKey object. Return null if there are no keys in the hash.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea"></a>
- <div class="api">
- <div class="prototype">
- void
- hashFree
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id)
- </div>
- <div class="apiDetail">
- <p>Free a hash table.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- hashLookup
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Lookup a name in the hash table.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- <tr><td class="param">name</td><td>Key name to search for.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the WebKey object storing the key and value.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1ga1ca237f892334fd5a59387dc0c230f0d"></a>
- <div class="api">
- <div class="prototype">
- void *
- hashLookupSymbol
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> sd, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Lookup a name in the hash table and return a symbol reference.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sd</td><td>Hash table id returned by hashCreate.</td>
- <tr><td class="param">name</td><td>Key name to search for.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the symbole.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a>, <a href="#group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21" class="ref">hashNext</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_hash_1gad26ba48ce394674a7e026dcc876f4e21"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_key" class="ref">WebsKey</a> *
- hashNext
- (<a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> id, <a href="#struct_webs_key" class="ref">WebsKey</a> *last)
- </div>
- <div class="apiDetail">
- <p>Continue walking the hash keys by returning the next key entry in the hash.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Hash table id returned by hashCreate.</td>
- <tr><td class="param">last</td><td>Reference to a WebsKey to hold the current traversal key state.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the next WebKey object. Returns null if no more keys exist to be traversed.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_hash_1ga38965650a2f6f2666e0120498594a135" class="ref">hashCreate</a>, <a href="#group___webs_hash_1ga9ba32a89679bec0a778ce61dbc7a8e7b" class="ref">hashDelete</a>, <a href="#group___webs_hash_1ga71278c9972c9252d0f6c34cda14bc156" class="ref">hashEnter</a>, <a href="#group___webs_hash_1gac33b2f81aa5b83316a20dd6ea6da9bd1" class="ref">hashFirst</a>, <a href="#group___webs_hash_1gae27ba1e72086c5fbc0019882c88129ea" class="ref">hashFree</a>, <a href="#group___webs_hash_1gae4dee9e0f69cd3e5a85b0952b022a414" class="ref">hashLookup</a></dd></dl>
- </div>
- </div>
- <h1>WebsRoute</h1>
- <a name="group___webs_route"></a>
- <div class="api">
- <div class="prototype">WebsRoute</div>
- <div class="apiDetail">
- <p>Request route structure.</p>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
- Required user abilities.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_1ga6e48901e1591eed982ca02059748538b">WebsAskLogin</a></td><td><td>askLogin</td><td>
- Route path prefix.
- </td>
- <tr><td class="param">char *</td><td><td>authType</td><td>
- Authentication type.
- </td>
- <tr><td class="param">char *</td><td><td>dir</td><td>
- Filesystem base directory for route documents.
- </td>
- <tr><td class="param">WebsHash</td><td><td>extensions</td><td>
- Permissible URI extensions.
- </td>
- <tr><td class="param">int</td><td><td>flags</td><td>
- Route control flags.
- </td>
- <tr><td class="param"><a class="ref" href="#struct_webs_handler">WebsHandler</a> *</td><td><td>handler</td><td>
- Request handler to service requests.
- </td>
- <tr><td class="param">WebsHash</td><td><td>methods</td><td>
- Supported HTTP methods.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_1ga15af4264d6a7f06686169c0ca2fd397e">WebsParseAuth</a></td><td><td>parseAuth</td><td>
- Parse authentication details callback.
- </td>
- <tr><td class="param">char *</td><td><td>prefix</td><td>
- Route path prefix.
- </td>
- <tr><td class="param">ssize</td><td><td>prefixLen</td><td>
- Prefix length.
- </td>
- <tr><td class="param">char *</td><td><td>protocol</td><td>
- HTTP protocol to use for this route.
- </td>
- <tr><td class="param">WebsHash</td><td><td>redirects</td><td>
- Response redirections.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_1ga51bf732cb5d04090e77cfa66eeca394c">WebsVerify</a></td><td><td>verify</td><td>
- Verify password callback.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga591531eedbacb9dbe29c0461ebbdd9eb"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_route" class="ref">WebsRoute</a> *
- websAddRoute
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *handler, int pos)
- </div>
- <div class="apiDetail">
- <p>Add a route to the routing tables.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">uri</td><td>Matching URI prefix.</td>
- <tr><td class="param">handler</td><td>Request handler to service routed requests.</td>
- <tr><td class="param">pos</td><td>Position in the list of routes. Zero inserts at the front of the list. A value of -1 will append to the end of the list.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>A route object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga712fb5968ea34647fbd198b281576b4e"></a>
- <div class="api">
- <div class="prototype">
- void
- websCloseRoute
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the route module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga84cade4d96e10f90f48a89403ffe8585"></a>
- <div class="api">
- <div class="prototype">
- int
- websLoad
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
- </div>
- <div class="apiDetail">
- <p>Load routing tables from the specified filename.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>Route configuration filename.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga22d74d0805089decff152b0a35d4442f"></a>
- <div class="api">
- <div class="prototype">
- int
- websOpenRoute
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the routing module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1gadccfe94478f976a3a93b8a5b9be1acc0"></a>
- <div class="api">
- <div class="prototype">
- int
- websRemoveRoute
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *uri)
- </div>
- <div class="apiDetail">
- <p>Remove a route from the routing tables.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">uri</td><td>Matching URI prefix.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d"></a>
- <div class="api">
- <div class="prototype">
- void
- websRouteRequest
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Route a request.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine will select a matching route and will invoke the selected route handler to service the request. In the process, authentication and request rewriting may take place. This routine is called internally by the request pipeline.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga13356d1f5c87381edd681495e5187bcd"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websRunRequest
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Run a request handler.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine will run the handler and route selected by <a class="ref" href="#group___webs_route_1gabac20ffa1da08fefb06d471c6a589c1d">websRouteRequest</a>. This routine is called internally by the request pipeline.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the handler serviced the request. Return false to test other routes to handle this request. This is for legacy handlers that do not have a match callback.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga0326b013f41e0911bfd8c28f7041f209"></a>
- <div class="api">
- <div class="prototype">
- int
- websSetRouteAuth
- (<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *authType)
- </div>
- <div class="apiDetail">
- <p>Set route authentication scheme.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">route</td><td>Route to modify.</td>
- <tr><td class="param">authType</td><td>Set to "basic", "digest" or "form".</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_route_1ga02ded6cfc279652c2dca6d86f2adc8d8"></a>
- <div class="api">
- <div class="prototype">
- int
- websSetRouteMatch
- (<a href="#group___webs_route" class="ref">WebsRoute</a> *route, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *dir, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *protocol, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> methods, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> extensions, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> abilities, <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a> redirects)
- </div>
- <div class="apiDetail">
- <p>Configure a route by adding matching criteria.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">route</td><td>Route to modify.</td>
- <tr><td class="param">dir</td><td>Set the route documents directory filename.</td>
- <tr><td class="param">protocol</td><td>Set the matching HTTP protocol (http or https).</td>
- <tr><td class="param">methods</td><td>Hash of permissible HTTP methods. (GET, HEAD, POST, PUT).</td>
- <tr><td class="param">extensions</td><td>Hash of permissible URI filename extensions.</td>
- <tr><td class="param">abilities</td><td>Required user abilities. The user must be authenticated.</td>
- <tr><td class="param">abilities</td><td>Required user abilities. If abilities are required, the user must be authenticated.</td>
- <tr><td class="param">redirects</td><td>Set of applicable response redirections when completing the request.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <h1>WebsRuntime</h1>
- <a name="group___webs_runtime"></a>
- <div class="api">
- <div class="prototype">WebsRuntime</div>
- <div class="apiDetail">
- <p>GoAhead Web Server Runtime.</p>
- <dl><dt><b>Description</b>:</dt><dd>GoAhead provides a secure runtime environment for safe string manipulation and to help prevent buffer overflows and other potential security traps.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f"></a>
- <div class="api">
- <div class="prototype">
- char *
- fmt
- (char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> maxSize, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)
- </div>
- <div class="apiDetail">
- <p>Format a string into a static buffer.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call format a string using printf style formatting arguments. A trailing null will always be appended. The call returns the size of the allocated string excluding the null.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">buf</td><td>Pointer to the buffer.</td>
- <tr><td class="param">maxSize</td><td>Size of the buffer.</td>
- <tr><td class="param">format</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Variable arguments to format.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The buffer.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a91ad9478d81a7aaf2593e8d9c3d06a14" class="ref">uint</a>
- hextoi
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Convert a hex string to an integer.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied string to an integer using base 16.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>Pointer to the string to parse.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The integer equivalent value of the string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780"></a>
- <div class="api">
- <div class="prototype">
- char *
- itosbuf
- (char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size, <a href="osdep.html#osdep_8h_1a168afaa12b2c08e4ae1d11ea4c296e64" class="ref">int64</a> value, int radix)
- </div>
- <div class="apiDetail">
- <p>Convert an integer to a string buffer.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call converts the supplied 64 bit integer into a string formatted into the supplied buffer according to the specified radix.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">buf</td><td>Pointer to the buffer that will hold the string.</td>
- <tr><td class="param">size</td><td>Size of the buffer.</td>
- <tr><td class="param">value</td><td>Integer value to convert.</td>
- <tr><td class="param">radix</td><td>The base radix to use when encoding the number.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a reference to the string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2"></a>
- <div class="api">
- <div class="prototype">
- int
- scaselesscmp
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
- </div>
- <div class="apiDetail">
- <p>Compare strings ignoring case.</p>
- This is a safe replacement for strcasecmp. It can handle NULL args
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences. This call operates similarly to strcmp.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, < 0 if s1 sorts lower than s2 in the collating sequence or > 0 if it sorts higher.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- scaselessmatch
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
- </div>
- <div class="apiDetail">
- <p>Compare strings ignoring case.</p>
- This is similar to scaselesscmp but it returns a boolean
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46"></a>
- <div class="api">
- <div class="prototype">
- char *
- sclone
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Clone a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Copy a string into a newly allocated block.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139"></a>
- <div class="api">
- <div class="prototype">
- int
- scmp
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
- </div>
- <div class="apiDetail">
- <p>Compare strings.</p>
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is a safe replacement for strcmp. It can handle null args.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns zero if the strings are identical. Return -1 if the first string is less than the second. Return 1 if the first string is greater than the second.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- scopy
- (char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src)
- </div>
- <div class="apiDetail">
- <p>Copy a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strcpy. Copy a string and ensure the destination buffer is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is always terminated with a null.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td>
- <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td>
- <tr><td class="param">src</td><td>String to copy.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The number of characters in the target string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed"></a>
- <div class="api">
- <div class="prototype">
- char *
- sfmt
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, ...)
- </div>
- <div class="apiDetail">
- <p>Format a string.</p>
- This is a secure version of printf that can handle null args
- <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See <a class="ref" href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f">fmt()</a> for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">format</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Variable arguments for the format string.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417"></a>
- <div class="api">
- <div class="prototype">
- char *
- sfmtv
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *format, va_list args)
- </div>
- <div class="apiDetail">
- <p>Format a string with varargs.</p>
- This is a secure version of printf that can handle null args
- <dl><dt><b>Description</b>:</dt><dd>Format the given arguments according to the printf style format. See <a class="ref" href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f">fmt()</a> for a full list of the format specifies. This is a secure replacement for sprintf, it can handle null arguments without crashes.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">format</td><td>Printf style format string.</td>
- <tr><td class="param">args</td><td>Varargs argument obtained from va_start.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gade405095134ad54db6dc94fcd6216961"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- slen
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str)
- </div>
- <div class="apiDetail">
- <p>Return the length of a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strlen. This call returns the length of a string and tests if the length is less than a given maximum. It will return zero for NULL args.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to measure.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The length of the string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf"></a>
- <div class="api">
- <div class="prototype">
- char *
- slower
- (char *str)
- </div>
- <div class="apiDetail">
- <p>Convert a string to lower case.</p>
- <dl><dt><b>Description</b>:</dt><dd>Convert a string to its lower case equivalent.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to convert. This string is modified.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the supplied str. Caller must not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- smatch
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2)
- </div>
- <div class="apiDetail">
- <p>Compare strings.</p>
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings. This is similar to <a class="ref" href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139">scmp</a> but it returns a boolean.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns true if the strings are equivalent, otherwise false.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972"></a>
- <div class="api">
- <div class="prototype">
- int
- sncaselesscmp
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Compare strings ignoring case.</p>
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings ignoring case differences for a given string length. This call operates similarly to strncasecmp.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- <tr><td class="param">len</td><td>Length of characters to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, < 0 if s1 sorts lower than s2 in the collating sequence or > 0 if it sorts higher.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gafc391546b97fb1fefb3dd78a96acb1b4"></a>
- <div class="api">
- <div class="prototype">
- char *
- snclone
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Clone a substring.</p>
- <dl><dt><b>Description</b>:</dt><dd>Copy a substring into a newly allocated block.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>Pointer to the block to duplicate.</td>
- <tr><td class="param">len</td><td>Number of bytes to copy. The actual length copied is the minimum of the given length and the length of the supplied string. The result is null terminated.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a newly allocated string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7"></a>
- <div class="api">
- <div class="prototype">
- int
- sncmp
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s1, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *s2, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Compare strings.</p>
- <dl><dt><b>Description</b>:</dt><dd>Compare two strings for a given string length. This call operates similarly to strncmp.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">s1</td><td>First string to compare.</td>
- <tr><td class="param">s2</td><td>Second string to compare.</td>
- <tr><td class="param">len</td><td>Length of characters to compare.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns zero if the strings are equivalent, < 0 if s1 sorts lower than s2 in the collating sequence or > 0 if it sorts higher.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- sncopy
- (char *dest, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> destMax, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *src, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> count)
- </div>
- <div class="apiDetail">
- <p>Copy characters from a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Safe replacement for strncpy. Copy bytes from a string and ensure the target string is not overflowed. The call returns the length of the resultant string or an error code if it will not fit into the target string. This is similar to strcpy, but it will enforce a maximum size for the copied string and will ensure it is terminated with a null.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">dest</td><td>Pointer to a pointer that will hold the address of the allocated block.</td>
- <tr><td class="param">destMax</td><td>Maximum size of the target string in characters.</td>
- <tr><td class="param">src</td><td>String to copy.</td>
- <tr><td class="param">count</td><td>Maximum count of characters to copy.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a reference to the destination if successful or NULL if the string won't fit.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga3749b26084eb67b7f76bb7aa48c839d5"></a>
- <div class="api">
- <div class="prototype">
- char *
- ssplit
- (char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
- </div>
- <div class="apiDetail">
- <p>Split a string at a delimiter.</p>
- <dl><dt><b>Description</b>:</dt><dd>Split a string and return parts. The string is modified. This routiner never returns null. If there are leading delimiters, the empty string will be returned and *last will be set to the portion after the delimiters. If str is null, an empty string will be returned. If there are no characters after the delimiter, then *last will be set to the empty string.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to tokenize.</td>
- <tr><td class="param">delim</td><td>Set of characters that are used as token separators.</td>
- <tr><td class="param">last</td><td>Reference to the portion after the delimiters. Will return an empty string if is not trailing portion.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a pointer to the first part before the delimiters. If the string begins with delimiters, the empty string will be returned.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177"></a>
- <div class="api">
- <div class="prototype">
- char *
- stok
- (char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *delim, char **last)
- </div>
- <div class="apiDetail">
- <p>Tokenize a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Split a string into tokens.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to tokenize.</td>
- <tr><td class="param">delim</td><td>String of characters to use as token separators.</td>
- <tr><td class="param">last</td><td>Last token pointer.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a pointer to the next token.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657"></a>
- <div class="api">
- <div class="prototype">
- char *
- strim
- (char *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *set, int where)
- </div>
- <div class="apiDetail">
- <p>Trim a string.</p>
- <dl><dt><b>Description</b>:</dt><dd>Trim leading and trailing characters off a string.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to trim.</td>
- <tr><td class="param">set</td><td>String of characters to remove.</td>
- <tr><td class="param">where</td><td>Flags to indicate trim from the start, end or both. Use WEBS_TRIM_START, WEBS_TRIM_END, WEBS_TRIM_BOTH.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a pointer to the trimmed string. May not equal str.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4"></a>
- <div class="api">
- <div class="prototype">
- char *
- supper
- (char *str)
- </div>
- <div class="apiDetail">
- <p>Convert a string to upper case.</p>
- <dl><dt><b>Description</b>:</dt><dd>Convert a string to its upper case equivalent.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to convert. This string is modified.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns a pointer to the converted string. Will always equal str. Caller must not free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09"></a>
- <div class="api">
- <div class="prototype">
- int
- wallocHandle
- (void *map)
- </div>
- <div class="apiDetail">
- <p>Allocate a handle from a map.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">map</td><td>Reference to a location holding the map reference. On the first call, the map is allocated.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d"></a>
- <div class="api">
- <div class="prototype">
- int
- wallocObject
- (void *map, int *max, int size)
- </div>
- <div class="apiDetail">
- <p>Allocate an object in a halloc map.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">map</td><td>Reference to a location holding the map reference. On the first call, the map is allocated.</td>
- <tr><td class="param">max</td><td>Reference to an integer that holds the maximum handle in the map.</td>
- <tr><td class="param">size</td><td>Size of the object to allocate.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga766658ed30f45bec60eef120f2b74c08"></a>
- <div class="api">
- <div class="prototype">
- void
- websRestartEvent
- (int id, int delay)
- </div>
- <div class="apiDetail">
- <p>Restart an event.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Event id allocated by websStartEvent.</td>
- <tr><td class="param">delay</td><td>Delay in milliseconds till the event next runs.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga31529c388cac3e90a71766bc445b6575"></a>
- <div class="api">
- <div class="prototype">
- int
- websRunEvents
- (void )
- </div>
- <div class="apiDetail">
- <p>Run due events.</p>
- <dl><dt>Returns:</dt><dd>Time delay till the next event.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga3d52faf06a56379bb23247aa9a0acb0f"></a>
- <div class="api">
- <div class="prototype">
- int
- websStartEvent
- (int delay, <a href="#group___webs_runtime_1ga1d4b3f68e80ae2c0095153a94aed1d4a" class="ref">WebsEventProc</a> proc, void *data)
- </div>
- <div class="apiDetail">
- <p>Start a callback event.</p>
- <dl><dt><b>Description</b>:</dt><dd>This schedules an event to run once. The event can be rescheduled in the callback by invoking websRestartEvent.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">delay</td><td>Delay in milliseconds in which to run the callback.</td>
- <tr><td class="param">proc</td><td>Callback procedure function. Signature is: void (*fn)(void *data, int id).</td>
- <tr><td class="param">data</td><td>Data reference to pass to the callback.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>A positive integer event ID.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga9a6524bc11288246c84651f99fd24425"></a>
- <div class="api">
- <div class="prototype">
- void
- websStopEvent
- (int id)
- </div>
- <div class="apiDetail">
- <p>Stop an event.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">id</td><td>Event id allocated by websStartEvent.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2"></a>
- <div class="api">
- <div class="prototype">
- int
- wfreeHandle
- (void *map, int handle)
- </div>
- <div class="apiDetail">
- <p>Free a handle in the map.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">map</td><td>Reference to a location to hold the map reference.</td>
- <tr><td class="param">handle</td><td>Handle to free in the map.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Integer handle index. Otherwise return -1 on allocation errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a></dd></dl>
- </div>
- </div>
- <h1>WebsSession</h1>
- <a name="group___webs_session"></a>
- <div class="api">
- <div class="prototype">WebsSession</div>
- <div class="apiDetail">
- <p>Session state storage.</p>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">WebsHash</td><td><td>cache</td><td>
- Cache of session variables.
- </td>
- <tr><td class="param">WebsTime</td><td><td>expires</td><td>
- When the session expires.
- </td>
- <tr><td class="param">char *</td><td><td>id</td><td>
- Session ID key.
- </td>
- <tr><td class="param">int</td><td><td>lifespan</td><td>
- Session inactivity timeout (secs).
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1ga960eb7ffd15820d3305445b257462b9d"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_session" class="ref">WebsSession</a> *
- websAllocSession
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *id, int lifespan)
- </div>
- <div class="apiDetail">
- <p>Test if a user possesses the required ability.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">id</td><td>Session ID to use. Set to null to allocate a new session ID.</td>
- <tr><td class="param">lifespan</td><td>Lifespan of the session in seconds.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Allocated session object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1ga69bb1da9a9f13651d5a6db9379cb37e9"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_session" class="ref">WebsSession</a> *
- websCreateSession
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Test if a user possesses the required ability.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Allocated session object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1ga8f9464efab7e9045cab72863ccdb81db"></a>
- <div class="api">
- <div class="prototype">
- void
- websDestroySession
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Destroy the webs session object.</p>
- <dl><dt><b>Description</b>:</dt><dd>Useful to be called as part of the user logout process.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1gabaceff85a59337282e9807f62aa046a7"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_session" class="ref">WebsSession</a> *
- websGetSession
- (<a href="#group___webs" class="ref">Webs</a> *wp, int create)
- </div>
- <div class="apiDetail">
- <p>Get the session state object for the current request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">create</td><td>Set to true to create a new session if one does not already exist.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Session object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1gac8c7bf25c2eda7a6a23111f8bff56df7"></a>
- <div class="api">
- <div class="prototype">
- char *
- websGetSessionID
- (<a href="#group___webs" class="ref">Webs</a> *wp)
- </div>
- <div class="apiDetail">
- <p>Get the session ID.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The session ID if session state storage is defined for this request. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1gae766fcda76d2f12f44e21a7ed18ffd55"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *
- websGetSessionVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *defaultValue)
- </div>
- <div class="apiDetail">
- <p>Get a session variable.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Session variable name.</td>
- <tr><td class="param">defaultValue</td><td>Default value to return if the variable does not exist.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Session variable value or default value if it does not exist.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1ga7ae8ed7ba925a225ee0bad96f3829c56"></a>
- <div class="api">
- <div class="prototype">
- void
- websRemoveSessionVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name)
- </div>
- <div class="apiDetail">
- <p>Remove a session variable.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Session variable name.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_session_1ga7392f09b1b9c7d9d230701d6d2636a5e"></a>
- <div class="api">
- <div class="prototype">
- int
- websSetSessionVar
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *name, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value)
- </div>
- <div class="apiDetail">
- <p>Set a session variable name value.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">name</td><td>Session variable name.</td>
- <tr><td class="param">value</td><td>Value to set the variable to.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <h1>WebsSocket</h1>
- <a name="group___webs_socket"></a>
- <div class="api">
- <div class="prototype">WebsSocket</div>
- <div class="apiDetail">
- <p>Socket control structure.</p>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param"><a class="ref" href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92">SocketAccept</a></td><td><td>accept</td><td>
- Accept handler.
- </td>
- <tr><td class="param">int</td><td><td>currentEvents</td><td>
- Mask of ready events (FD_xx).
- </td>
- <tr><td class="param">int</td><td><td>error</td><td>
- Last error.
- </td>
- <tr><td class="param">int</td><td><td>fileHandle</td><td>
- ID of the file handler.
- </td>
- <tr><td class="param">int</td><td><td>flags</td><td>
- Current state flags.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_socket_1ga657e287f5f61294f65c3092a0e0b5e18">SocketHandler</a></td><td><td>handler</td><td>
- User I/O handler.
- </td>
- <tr><td class="param">void *</td><td><td>handler_data</td><td>
- User handler data.
- </td>
- <tr><td class="param">int</td><td><td>handlerMask</td><td>
- Handler events of interest.
- </td>
- <tr><td class="param">int</td><td><td>handshakes</td><td>
- Number of renegotiations.
- </td>
- <tr><td class="param">int</td><td><td>interestEvents</td><td>
- Mask of events to watch for.
- </td>
- <tr><td class="param">char *</td><td><td>ip</td><td>
- Server listen address or remote client address.
- </td>
- <tr><td class="param">WebsBuf</td><td><td>lineBuf</td><td>
- Line ring queue.
- </td>
- <tr><td class="param">int</td><td><td>port</td><td>
- Port to listen on.
- </td>
- <tr><td class="param">int</td><td><td>saveMask</td><td>
- saved Mask for socketFlush.
- </td>
- <tr><td class="param">int</td><td><td>secure</td><td>
- Socket is using SSL.
- </td>
- <tr><td class="param">int</td><td><td>selectEvents</td><td>
- Events being selected.
- </td>
- <tr><td class="param">int</td><td><td>sid</td><td>
- Index into socket[].
- </td>
- <tr><td class="param">Socket</td><td><td>sock</td><td>
- Actual socket handle.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gac14f3548201f71b558822b3c68153ebe"></a>
- <div class="api">
- <div class="prototype">
- int
- socketAddress
- (struct sockaddr *addr, int addrlen, char *ipbuf, int ipLen, int *port)
- </div>
- <div class="apiDetail">
- <p>Extract the numerical IP address and port for the given socket info.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">addr</td><td>Reference to the socket address.</td>
- <tr><td class="param">addrlen</td><td>Length of the socket address.</td>
- <tr><td class="param">ipbuf</td><td>Buffer to contain the parsed IP address.</td>
- <tr><td class="param">ipLen</td><td>Size of ipbuf.</td>
- <tr><td class="param">port</td><td>Reference to an integer to hold the parsed port.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful. Otherwise -1 for parse errors.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- socketAddressIsV6
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip)
- </div>
- <div class="apiDetail">
- <p>Determine if an IP address is an IPv6 address.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">ip</td><td>String IP address.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047"></a>
- <div class="api">
- <div class="prototype">
- int
- socketAlloc
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92" class="ref">SocketAccept</a> accept, int flags)
- </div>
- <div class="apiDetail">
- <p>Allocate a socket object.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">host</td><td>String host IP address.</td>
- <tr><td class="param">port</td><td>Socket port.</td>
- <tr><td class="param">accept</td><td>Optional SocketAccept accept callback function.</td>
- <tr><td class="param">flags</td><td>Control flags.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Socket ID handle to use with other APIs.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959"></a>
- <div class="api">
- <div class="prototype">
- void
- socketClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the socket module.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7"></a>
- <div class="api">
- <div class="prototype">
- void
- socketCloseConnection
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Close a socket connection.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gada07f74963867ae158f0289c8483f846"></a>
- <div class="api">
- <div class="prototype">
- int
- socketConnect
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, int flags)
- </div>
- <div class="apiDetail">
- <p>Connect to a server and create a new socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">host</td><td>Host IP address.</td>
- <tr><td class="param">port</td><td>Port number to connect to.</td>
- <tr><td class="param">flags</td><td>Set to SOCKET_BLOCK for blocking I/O. Otherwise non-blocking I/O is used.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c"></a>
- <div class="api">
- <div class="prototype">
- void
- socketCreateHandler
- (int sid, int mask, <a href="#group___webs_socket_1ga657e287f5f61294f65c3092a0e0b5e18" class="ref">SocketHandler</a> handler, void *arg)
- </div>
- <div class="apiDetail">
- <p>Create a socket handler that will be invoked when I/O events occur.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
- <tr><td class="param">handler</td><td>Socket handler function.</td>
- <tr><td class="param">arg</td><td>Arbitrary object reference to pass to the SocketHandler callback function.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the address is an IPv6 address.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga8844ac81357964309fd7e9f872ad1bd7"></a>
- <div class="api">
- <div class="prototype">
- void
- socketDeleteHandler
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Delete a socket handler created via socketCreateHandler.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- socketEof
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Determine if the socket is at end-of-file for input.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the address is at EOF.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad"></a>
- <div class="api">
- <div class="prototype">
- void
- socketFree
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Free (and close) the socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7"></a>
- <div class="api">
- <div class="prototype">
- int
- socketGetBlock
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Get the current blocking mode.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the socket is in blocking mode.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04"></a>
- <div class="api">
- <div class="prototype">
- int
- socketGetError
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Get the error code for the last socket operation on this thread.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Integer error code. See errno or GetLastError() on windows.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1af9381320a2640ea84038579d8f143c01" class="ref">Socket</a>
- socketGetHandle
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Get the underlying socket operating system socket/file handle.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The socket handle.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gac772288c5a34e90adb7e3c0edd372576"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_socket" class="ref">WebsSocket</a> **
- socketGetList
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the list of sockets.</p>
- <dl><dt>Returns:</dt><dd>The socket list pointer.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga41ef4201ad35371958671487b56689e3"></a>
- <div class="api">
- <div class="prototype">
- int
- socketGetPort
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Get the IP port associated with this socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The TCP/IP port for this socket.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gae6ec811c6a5800916ac00db2c7c9fb30"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- socketHasDualNetworkStack
- (void )
- </div>
- <div class="apiDetail">
- <p>Indicate if the system has a dual IPv4 and IPv6 stack.</p>
- <dl><dt>Returns:</dt><dd>True if IPv4 and IPv6 are supported on a single stack.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga764eb6101ccc3ba01f775436432cfd48"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- socketHasIPv6
- (void )
- </div>
- <div class="apiDetail">
- <p>Indicate if the system has IPv6 support.</p>
- <dl><dt>Returns:</dt><dd>True if IPv6 is supported on this system.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga22d77c01e3349be30f4a24e790b72499"></a>
- <div class="api">
- <div class="prototype">
- void
- socketHiddenData
- (<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len, int dir)
- </div>
- <div class="apiDetail">
- <p>Indicate that the application layer has buffered data for the socket.</p>
- <dl><dt><b>Description</b>:</dt><dd>This is used by SSL and other network stacks that buffer pending data.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sp</td><td>Socket object returned from <a class="ref" href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f">socketPtr</a></td>
- <tr><td class="param">len</td><td>Length of buffered data in bytes.</td>
- <tr><td class="param">dir</td><td>Buffer direction. Set to MPR_READABLE for buffered read data and MPR_WRITABLE for buffered write data.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gabd3226bb7b28114550f997df00067f8c"></a>
- <div class="api">
- <div class="prototype">
- int
- socketInfo
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ip, int port, int *family, int *protocol, struct sockaddr_storage *addr, <a href="#goahead_8h_1a7e81f05ea37d05efc10e7c45c1111d0d" class="ref">Socklen</a> *addrlen)
- </div>
- <div class="apiDetail">
- <p>Get a socket address structure for the specified IP:Port.</p>
- <dl><dt><b>Description</b>:</dt><dd>This returns address details in *family, *protocol, *addr, and *addrlen.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">ip</td><td>IP address to parse.</td>
- <tr><td class="param">port</td><td>TCP/IP port number.</td>
- <tr><td class="param">family</td><td>Reference to an integer to hold the address family.</td>
- <tr><td class="param">protocol</td><td>Reference to an integer to hold the address protocol.</td>
- <tr><td class="param">addr</td><td>Reference to an integer to hold the address structure.</td>
- <tr><td class="param">addrlen</td><td>Reference to an integer to hold the address structure length.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- socketIsV6
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Determine if a socket is bound to an IPv6 address.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the socket is using IPv6.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga0a776cf248c686363c87658082170a16"></a>
- <div class="api">
- <div class="prototype">
- int
- socketListen
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *host, int port, <a href="#group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92" class="ref">SocketAccept</a> accept, int flags)
- </div>
- <div class="apiDetail">
- <p>Open a listening socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">host</td><td>Host IP address on which to listen. Set to NULL to listen on all interfaces.</td>
- <tr><td class="param">port</td><td>TCP/IP port on which to listen.</td>
- <tr><td class="param">accept</td><td>SocketAccept callback function to invoke to receive incoming connections.</td>
- <tr><td class="param">flags</td><td>Reserved.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522"></a>
- <div class="api">
- <div class="prototype">
- int
- socketOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the socket module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd"></a>
- <div class="api">
- <div class="prototype">
- int
- socketParseAddress
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *ipAddrPort, char **pip, int *pport, int *secure, int defaultPort)
- </div>
- <div class="apiDetail">
- <p>Parse an IP address into its constituent parts.</p>
- <dl><dt><b>Description</b>:</dt><dd>Parse the IP address and return the IP address and port components. Handles ipv4 and ipv6 addresses. If the IP portion is absent, pip is set to null. If the port portion is absent, port is set to the defaultPort. If a ":*" port specifier is used, pport is set to -1; When an address contains an ipv6 port it should be written as aaaa:bbbb:cccc:dddd:eeee:ffff:gggg:hhhh:iiii or If supplied an IPv6 address, the backets are stripped in the returned IP address.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">ipAddrPort</td><td>IP address which may contain an optional ":port" component.</td>
- <tr><td class="param">pip</td><td>Returns a reference to an allocated string containing the IP address portion. Caller must free.</td>
- <tr><td class="param">pport</td><td>Reference to an integer to hold the port component.</td>
- <tr><td class="param">secure</td><td>Reference to an integer to be set to true if the address is using SSL/TLS.</td>
- <tr><td class="param">defaultPort</td><td>Default port number to use if no port specifier is included in ipAddrPort.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15"></a>
- <div class="api">
- <div class="prototype">
- void
- socketProcess
- (void )
- </div>
- <div class="apiDetail">
- <p>Process pending socket I/O events.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_socket" class="ref">WebsSocket</a> *
- socketPtr
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Return the socket object for the socket ID.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Corresponding socket object.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- socketRead
- (int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Read data from a socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">buf</td><td>Buffer to hold read data.</td>
- <tr><td class="param">len</td><td>Size of the buffer.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes actually read. Returns -1 for errors and EOF. Distinguish between errors and EOF via <a class="ref" href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150">socketEof()</a></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01"></a>
- <div class="api">
- <div class="prototype">
- void
- socketRegisterInterest
- (int sid, int mask)
- </div>
- <div class="apiDetail">
- <p>Register interest in socket I/OEvents.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac"></a>
- <div class="api">
- <div class="prototype">
- void
- socketReservice
- (int sid)
- </div>
- <div class="apiDetail">
- <p>Request that the socket be reserviced.</p>
- <dl><dt><b>Description</b>:</dt><dd>This routine is useful when upper layers have unprocessed, buffered data for the socket. This routine will cause the socket I/O callback handler to be invoked soon in the future.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f"></a>
- <div class="api">
- <div class="prototype">
- int
- socketSelect
- (int sid, int timeout)
- </div>
- <div class="apiDetail">
- <p>Wait for I/O on a socket.</p>
- <dl><dt><b>Description</b>:</dt><dd>This call uses the mask of events of interest defined by socketRegisterInterest. It blocks the caller until a suitable I/O event or timeout occurs.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">timeout</td><td>Timeout in milliseconds.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Number of I/O events.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga87a2c90218477d33c088510d629174c7"></a>
- <div class="api">
- <div class="prototype">
- int
- socketSetBlock
- (int sid, int on)
- </div>
- <div class="apiDetail">
- <p>Set the socket blocking mode.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">on</td><td>Set to 1 to enable blocking.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The previous blocking mode.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac"></a>
- <div class="api">
- <div class="prototype">
- void
- socketSetError
- (int error)
- </div>
- <div class="apiDetail">
- <p>Set the error code for the last socket operation on this thread.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">error</td><td>Integer error code. See errno or GetLastError() on windows.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga172c24a34fcdff1a79fdde165738e07c"></a>
- <div class="api">
- <div class="prototype">
- int
- socketSetNoDelay
- (int sid, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> on)
- </div>
- <div class="apiDetail">
- <p>Set the socket delay mode.</p>
- <dl><dt><b>Description</b>:</dt><dd>This is used to enable or disable the TCP Nagle algorithm.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">on</td><td>Set to 1 to disable the Nagle algorithm.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The previous blocking mode.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9"></a>
- <div class="api">
- <div class="prototype">
- int
- socketWaitForEvent
- (<a href="#group___webs_socket" class="ref">WebsSocket</a> *sp, int mask)
- </div>
- <div class="apiDetail">
- <p>Wait for a socket I/O event.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sp</td><td>Socket object.</td>
- <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful in waiting for the desired event, otherwise return -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a>
- socketWrite
- (int sid, void *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> len)
- </div>
- <div class="apiDetail">
- <p>Write data to the socket.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or socketAccept.</td>
- <tr><td class="param">buf</td><td>Buffer containing data to write.</td>
- <tr><td class="param">len</td><td>Size of buf.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Count of bytes written. May be less than len if the socket is in non-blocking mode. Returns -1 for errors and if the socket cannot absorb any more data. If the transport is saturated, will return a negative error and errno will be set to EAGAIN or EWOULDBLOCK.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a></dd></dl>
- </div>
- </div>
- <h1>WebsUpload</h1>
- <a name="group___webs_upload"></a>
- <div class="api">
- <div class="prototype">WebsUpload</div>
- <div class="apiDetail">
- <p>File upload structure.</p>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">char *</td><td><td>clientFilename</td><td>
- Client side name of the file.
- </td>
- <tr><td class="param">char *</td><td><td>contentType</td><td>
- Content type.
- </td>
- <tr><td class="param">char *</td><td><td>filename</td><td>
- Local (temp) name of the file.
- </td>
- <tr><td class="param">ssize</td><td><td>size</td><td>
- Uploaded file size.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67" class="ref">WebsHash</a>
- websGetUpload
- (struct Webs *wp)
- </div>
- <div class="apiDetail">
- <p>Get the hash of uploaded files for the request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Hash table of uploaded files.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409"></a>
- <div class="api">
- <div class="prototype">
- <a href="#group___webs_upload" class="ref">WebsUpload</a> *
- websLookupUpload
- (struct Webs *wp, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *key)
- </div>
- <div class="apiDetail">
- <p>Open the file upload filter.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">key</td><td>Form upload name.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Upload object for the uploaded file.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b" class="ref">websUploadOpen</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_upload_1gab33d19bbf16e0437f2210fb832453f0b"></a>
- <div class="api">
- <div class="prototype">
- void
- websUploadOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the file upload filter.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_upload_1gaf80a429f3b30c1e621e917c8f04f0415" class="ref">websGetUpload</a>, <a href="#group___webs_upload_1ga5013b6ef4b2b9be6ea09dea369a8f409" class="ref">websLookupUpload</a></dd></dl>
- </div>
- </div>
- <h2>Functions</h2>
- <a name="goahead_8h_1a80adc8087f3a20a2669565b281d57a38"></a>
- <div class="api">
- <div class="prototype">
- void
- assert
- (<a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> cond)
- </div>
- <div class="apiDetail">
- <p>Assure that an assert condition is true.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">cond</td><td>Boolean result of a conditional test.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a03544bf56dde3a257391d07e1d6f6a3a"></a>
- <div class="api">
- <div class="prototype">
- void
- error
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Emit an error message.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a95bd348305d4a3044216ec4d694cd1d4"></a>
- <div class="api">
- <div class="prototype">
- void
- logClose
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the log logging module.</p>
- </div>
- </div>
- <a name="goahead_8h_1af07cb7c6e3a418059b33eb2243e0e945"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a>
- logGetHandler
- (void )
- </div>
- <div class="apiDetail">
- <p>Get the log callback.</p>
- <dl><dt>Returns:</dt><dd>Handler Callback handler function of type WebsLogHandler.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a02f3703e8699520d66c2477e225af267"></a>
- <div class="api">
- <div class="prototype">
- void
- logmsgProc
- (int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Emit a message to the log.</p>
- <dl><dt><b>Description</b>:</dt><dd>This emits a message at the specified level. GoAhead filters logging messages by defining a verbosity level at startup. Level 0 is the least verbose where only the most important messages will be output. Level 9 is the Logging support is enabled by the MakeMe setting: "logging: true" which creates the ME_GOAHEAD_LOGGING define in me.h most verbose. Level 2-4 are the most useful for debugging.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">level</td><td>Integer verbosity level (0-9).</td>
- <tr><td class="param">fmt</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Arguments for the format string.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a2c0c1dd956ebfaf981553f5a99cd7bb7"></a>
- <div class="api">
- <div class="prototype">
- int
- logOpen
- (void )
- </div>
- <div class="apiDetail">
- <p>Open the log logging module.</p>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a69d48d711cafc09c257c41705b29eb6a"></a>
- <div class="api">
- <div class="prototype">
- <a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a>
- logSetHandler
- (<a href="#goahead_8h_1aac2b25d0de54f2f4e282158b066fd523" class="ref">WebsLogHandler</a> handler)
- </div>
- <div class="apiDetail">
- <p>Set a log callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">handler</td><td>Callback handler function of type WebsLogHandler.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The previous callback function.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a973f65430b9ee826c6906891d2173bd3"></a>
- <div class="api">
- <div class="prototype">
- void
- logSetPath
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *path)
- </div>
- <div class="apiDetail">
- <p>Set the filename to save logging output.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">path</td><td>Filename path to use.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a5eec22bfd3a58a8c344d30175849f2ee"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- sstarts
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *str, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prefix)
- </div>
- <div class="apiDetail">
- <p>Test if the string starts with a given pattern.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">str</td><td>String to examine.</td>
- <tr><td class="param">prefix</td><td>Pattern to search for.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Returns TRUE if the pattern was found. Otherwise returns zero.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a377d5247f829befd58214234183e84ee"></a>
- <div class="api">
- <div class="prototype">
- void
- traceProc
- (int level, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *fmt, ...)
- </div>
- <div class="apiDetail">
- <p>Emit a debug trace message to the log.</p>
- <dl><dt><b>Description</b>:</dt><dd>This emits a message at the specified level. GoAhead filters logging messages by defining a verbosity level at startup. Level 0 is the least verbose where only the most important messages will be output. Level 9 is the most verbose. Level 2-4 are the most useful for debugging. Debug trace support is enabled by the MakeMe setting: "tracing: true" which creates the ME_GOAHEAD_TRACING define in me.h.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">level</td><td>Integer verbosity level (0-9).</td>
- <tr><td class="param">fmt</td><td>Printf style format string.</td>
- <tr><td class="param">...</td><td>Arguments for the format string.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1ac5058870cad6692d50f7fa9775a56c25"></a>
- <div class="api">
- <div class="prototype">
- void
- valueFree
- (<a href="#struct_webs_value" class="ref">WebsValue</a> *value)
- </div>
- <div class="apiDetail">
- <p>Free any allocated string in a value.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">value</td><td>Value object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1aa27f5beea810d9124985ecf1c1fe41fa"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_value" class="ref">WebsValue</a>
- valueInteger
- (long value)
- </div>
- <div class="apiDetail">
- <p>Create an integer value.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">value</td><td>Integer long value.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Value object containing the integer.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1adb8296687c9b528cfa0d9deb2eb42cf0"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_value" class="ref">WebsValue</a>
- valueString
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *value, int flags)
- </div>
- <div class="apiDetail">
- <p>Create an string value.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">value</td><td>String long value.</td>
- <tr><td class="param">flags</td><td>Set to VALUE_ALLOCATE to store a copy of the string reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Value object containing the string.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1aa9292efb92931035fbdb7e8cc9fc2a58"></a>
- <div class="api">
- <div class="prototype">
- <a href="#struct_webs_value" class="ref">WebsValue</a>
- valueSymbol
- (void *value)
- </div>
- <div class="apiDetail">
- <p>Create an symbol value containing an object reference.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">value</td><td>Value reference.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Value object containing the symbol reference.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a8fcf6c446be29f4fa9e558cef4f62428"></a>
- <div class="api">
- <div class="prototype">
- void *
- walloc
- (<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Allocate a block of the requested size.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">size</td><td>Memory size required.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>A reference to the allocated block.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1ab07b7c0b89520599c586358086c52568"></a>
- <div class="api">
- <div class="prototype">
- void
- wcloseAlloc
- (void )
- </div>
- <div class="apiDetail">
- <p>Close the GoAhead memory allocator.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a1a8530408eb04ac2cfe964c0be322e7d"></a>
- <div class="api">
- <div class="prototype">
- void *
- wdup
- (<a href="osdep.html#osdep_8h_1a5272042f7e0f5c53e2fd4b49ff47d92d" class="ref">cvoid</a> *ptr, size_t usize)
- </div>
- <div class="apiDetail">
- <p>Duplicate memory.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">ptr</td><td>Original block reference.</td>
- <tr><td class="param">usize</td><td>Size to allocate.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the new memory block.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a93ffe2fd6f833e223e48dac77c650daa"></a>
- <div class="api">
- <div class="prototype">
- <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a>
- websCheckPassword
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *plainTextPassword, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *passwordHash)
- </div>
- <div class="apiDetail">
- <p>Check a plain-text password against the defined hashed password.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">plainTextPassword</td><td>User's plain-text-password to check.</td>
- <tr><td class="param">passwordHash</td><td>Required password in hashed format previously computed by websMakePassword.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the password is correct.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1afd405fa10ef57a17f18b099e7cee1ee2"></a>
- <div class="api">
- <div class="prototype">
- char *
- websCryptPassword
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, <a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *salt, int rounds)
- </div>
- <div class="apiDetail">
- <p>Encrypt a password using the Blowfish algorithm.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">password</td><td>User's password to encrypt.</td>
- <tr><td class="param">salt</td><td>Salt text to add to password. Helps to make each user's password unique.</td>
- <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The encrypted password.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a3bc1b2f042bfc719a05eb1b9adb0776b"></a>
- <div class="api">
- <div class="prototype">
- int
- websGetRandomBytes
- (char *buf, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> length, <a href="osdep.html#osdep_8h_1ad5c9d4ba3dc37783a528b0925dc981a0" class="ref">bool</a> block)
- </div>
- <div class="apiDetail">
- <p>Get some random data.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">buf</td><td>Reference to a buffer to hold the random data.</td>
- <tr><td class="param">length</td><td>Size of the buffer.</td>
- <tr><td class="param">block</td><td>Set to true if it is acceptable to block while accumulating entropy sufficient to provide good random data. Setting to false will cause this API to not block and may return random data of a lower quality.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a91d31000f4f654a4f0d58acf73dbc169"></a>
- <div class="api">
- <div class="prototype">
- char *
- websMakePassword
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *password, int saltLength, int rounds)
- </div>
- <div class="apiDetail">
- <p>Make a password hash for a plain-text password using the Blowfish algorithm.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">password</td><td>User's password to encrypt.</td>
- <tr><td class="param">saltLength</td><td>Length of salt text to add to password. Helps to make each user's password unique.</td>
- <tr><td class="param">rounds</td><td>Number of times to encrypt. More times, makes the routine slower and passwords harder to crack.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The encrypted password. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1ad9f484cc1aa0aec171b19795a961b618"></a>
- <div class="api">
- <div class="prototype">
- char *
- websMakeSalt
- (<a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> size)
- </div>
- <div class="apiDetail">
- <p>Make salt for adding to a password.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">size</td><td>Size in bytes of the salt text.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The random salt text. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a55f60843dbda2cebe58dd6a2c8ad7f76"></a>
- <div class="api">
- <div class="prototype">
- char *
- websReadPassword
- (<a href="osdep.html#osdep_8h_1a0f128c3e0c83721af0220c00554e9c4e" class="ref">cchar</a> *prompt)
- </div>
- <div class="apiDetail">
- <p>Get a password from the terminal console.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">prompt</td><td>Text prompt to display before reading the password.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>The entered password. Caller must free.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Prototype.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a5a271ccc2e8fbc76a49f2f2022db21cc"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetBackgroundWriter
- (<a href="#group___webs" class="ref">Webs</a> *wp, <a href="#goahead_8h_1ae4404fa7b2ae18e39956ddbb6d78974d" class="ref">WebsWriteProc</a> proc)
- </div>
- <div class="apiDetail">
- <p>Define a background write I/O event callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">proc</td><td>Write callback.</td>
- </table></dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1ae8c0353bf1c238af495fa5e4122b4af6"></a>
- <div class="api">
- <div class="prototype">
- void
- websSetMemNotifier
- (<a href="#goahead_8h_1a3780611857f602b4ea243836f54de556" class="ref">WebsMemNotifier</a> cback)
- </div>
- <div class="apiDetail">
- <p>Define a global memory allocation notifier.</p>
- <dl><dt><b>Description</b>:</dt><dd>The notifier is called if any memory allocation fails. It is called with the requested allocation size as its only parameter.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">cback</td><td>Callback function to invoke for allocation failures.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Evolving.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1acd2db135e5aacbdc8e6a1f766298b2dd"></a>
- <div class="api">
- <div class="prototype">
- void
- wfree
- (void *blk)
- </div>
- <div class="apiDetail">
- <p>Free an allocated block of memory.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">blk</td><td>Reference to the memory block to free.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a0cdb01392e19df341254c5b2f593c654"></a>
- <div class="api">
- <div class="prototype">
- int
- wopenAlloc
- (void *buf, int bufsize, int flags)
- </div>
- <div class="apiDetail">
- <p>Initialize the walloc module.</p>
- <dl><dt><b>Description</b>:</dt><dd>The wopenAlloc function should be called the very first thing after the application starts and wclose should be called the last thing before exiting. If wopenAlloc is not called, it will be called on the first allocation with default values. "buf" points to memory to use of size "bufsize". If buf is NULL, memory is allocated using malloc. flags may be set to WEBS_USE_MALLOC if using malloc is okay. This routine will allocate * an initial buffer of size bufsize for use by the application.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">buf</td><td>Optional user supplied block of memory to use for allocations.</td>
- <tr><td class="param">bufsize</td><td>Size of buf.</td>
- <tr><td class="param">flags</td><td>Allocation flags. Set to WEBS_USE_MALLOC to permit the use of malloc() to grow memory.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a7cf93f44c111affc69d877812da50bae"></a>
- <div class="api">
- <div class="prototype">
- void *
- wrealloc
- (void *blk, <a href="osdep.html#osdep_8h_1a7d08ccc1e981eb4d5a238641ac4ccfc1" class="ref">ssize</a> newsize)
- </div>
- <div class="apiDetail">
- <p>Reallocate a block of memory and grow its size.</p>
- <dl><dt><b>Description</b>:</dt><dd>If the new size is larger than the existing block, a new block will be allocated and the old data will be copied to the new block.</dd></dl>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">blk</td><td>Original block reference.</td>
- <tr><td class="param">newsize</td><td>Size of the new block.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Reference to the new memory block.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- </div>
- </div>
- <h2>Typedefs</h2>
- <a name="goahead_8h_1a8b29ad60e66971115b4c4dbbc655ae67"></a>
- <div class="api">
- <div class="prototype">
- typedef int WebsHash.
- </div>
- <div class="apiDetail">
- <p>Hash table ID returned by hashCreate.</p>
- </div>
- </div>
- <a name="goahead_8h_1aac2b25d0de54f2f4e282158b066fd523"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsLogHandler)(int level, cchar *msg).
- </div>
- <div class="apiDetail">
- <p>Callback for emitting trace log output.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">level</td><td>Integer between 0 and 9. Zero is the lowest trace level used for the most important messages.</td>
- <tr><td class="param">msg</td><td>Message to log.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Zero if successful.</dd></dl>
- </div>
- </div>
- <a name="goahead_8h_1a3a874b92bbb07540254ed16567db3aa3"></a>
- <div class="api">
- <div class="prototype">
- typedef struct stat WebsStat.
- </div>
- <div class="apiDetail">
- <p>File status structure.</p>
- </div>
- </div>
- <a name="goahead_8h_1acdd9aaf80c8e9b08b3cf94200c91a6ae"></a>
- <div class="api">
- <div class="prototype">
- typedef time_t WebsTime.
- </div>
- <div class="apiDetail">
- <p>System native time type.</p>
- This is the time in seconds. This may be 32 or 64 bits and may be signed or unsigned on some systems
- </div>
- </div>
- <a name="goahead_8h_1ae4404fa7b2ae18e39956ddbb6d78974d"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsWriteProc)(struct Webs *wp).
- </div>
- <div class="apiDetail">
- <p>Callback for write I/O events.</p>
- </div>
- </div>
- <a name="group___webs_1gaef2ecde6d7702a3510c2848ee0fc5934"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsAction)(Webs *wp).
- </div>
- <div class="apiDetail">
- <p>Action callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga6e48901e1591eed982ca02059748538b"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsAskLogin)(Webs *wp).
- </div>
- <div class="apiDetail">
- <p>Callback to prompt the user for their password.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1gaaf026187015f50b6c6068f996cad29fc"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsHandlerClose)(void).
- </div>
- <div class="apiDetail">
- <p>GoAhead handler close to release memory prior to shutdown.</p>
- <dl><dt><b>Description</b>:</dt><dd>This callback is invoked when GoAhead is shutting down.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga6bc0396b0693e1501f5af39cab73e442"></a>
- <div class="api">
- <div class="prototype">
- typedef bool(* WebsHandlerProc)(Webs *wp).
- </div>
- <div class="apiDetail">
- <p>GoAhead handler service callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the handler serviced the request.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga95d129571903557ca1817968430bafd9"></a>
- <div class="api">
- <div class="prototype">
- typedef int(* WebsJstProc)(int jid, Webs *wp, int argc, char **argv).
- </div>
- <div class="apiDetail">
- <p>Javascript native function.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">jid</td><td>JavaScript engine ID.</td>
- <tr><td class="param">wp</td><td>Webs request object.</td>
- <tr><td class="param">argc</td><td>Count of function arguments.</td>
- <tr><td class="param">argv</td><td>Array of function arguments.</td>
- <tr><td class="param">defaultValue</td><td>Default value to return if the variable is not defined.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>Return zero if successful, otherwise -1.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga15af4264d6a7f06686169c0ca2fd397e"></a>
- <div class="api">
- <div class="prototype">
- typedef bool(* WebsParseAuth)(Webs *wp).
- </div>
- <div class="apiDetail">
- <p>Callback to parse authentication details submitted with the web request.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the details can be parsed.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_1ga51bf732cb5d04090e77cfa66eeca394c"></a>
- <div class="api">
- <div class="prototype">
- typedef bool(* WebsVerify)(Webs *wp).
- </div>
- <div class="apiDetail">
- <p>Callback to verify the username and password.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">wp</td><td>Webs request object.</td>
- </table></dd></dl>
- <dl><dt>Returns:</dt><dd>True if the password is verified.</dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- </dd></dl>
- </div>
- </div>
- <a name="group___webs_runtime_1ga1d4b3f68e80ae2c0095153a94aed1d4a"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* WebsEventProc)(void *data, int id).
- </div>
- <div class="apiDetail">
- <p>Callback function for events.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">data</td><td>Opaque data argument.</td>
- <tr><td class="param">id</td><td>Event ID.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_runtime_1ga73379454c6c7b60b4a69aff3f912466f" class="ref">fmt</a>, <a href="#group___webs_runtime_1ga0870ca42c7fd1330d5316792d9a9a04c" class="ref">hextoi</a>, <a href="#group___webs_runtime_1gabe1fb7ce5588a9f2ccc311f1dad44780" class="ref">itosbuf</a>, <a href="#group___webs_runtime_1gaf9cb27956141ddc4724cca9903fa69b2" class="ref">scaselesscmp</a>, <a href="#group___webs_runtime_1ga021eac46fe21719fb1f9c9d257f64280" class="ref">scaselessmatch</a>, <a href="#group___webs_runtime_1ga9f21afff72f27c5504c4188324a8ff46" class="ref">sclone</a>, <a href="#group___webs_runtime_1ga130862b0d455d9584014457bfeb4c139" class="ref">scmp</a>, <a href="#group___webs_runtime_1ga96df0c576bf6004507a3d0d11e18599a" class="ref">scopy</a>, <a href="#group___webs_runtime_1ga389593b572e23cb0823c83f0cb613eed" class="ref">sfmt</a>, <a href="#group___webs_runtime_1gafb88d66d14c7b5c824214b4c5d221417" class="ref">sfmtv</a>, <a href="#group___webs_runtime_1gade405095134ad54db6dc94fcd6216961" class="ref">slen</a>, <a href="#group___webs_runtime_1gaa3fe51647c6fd75aff0d6df508e664bf" class="ref">slower</a>, <a href="#group___webs_runtime_1gabe7d2af6c4afc8a57904b9276a43ffea" class="ref">smatch</a>, <a href="#group___webs_runtime_1ga30d6259caa94ed51abd25be83c0c4972" class="ref">sncaselesscmp</a>, <a href="#group___webs_runtime_1ga5217429e3f1dd3731530fe287bd893a7" class="ref">sncmp</a>, <a href="#group___webs_runtime_1ga7750a3b5b71a637c1ba2b7d98d7997d0" class="ref">sncopy</a>, <a href="#group___webs_runtime_1gad8ce8e873964777734fcf16459fcd177" class="ref">stok</a>, <a href="#group___webs_runtime_1gaa134dea5fb1197e6c989bb848e7cd657" class="ref">strim</a>, <a href="#group___webs_runtime_1ga7d25b31c850ea3535c0452a21ea14da4" class="ref">supper</a>, <a href="#group___webs_runtime_1gaf7553e70a9cd19a472ed5af514776e09" class="ref">wallocHandle</a>, <a href="#group___webs_runtime_1ga5bdd5a92db14503e6bb55c5c37c7580d" class="ref">wallocObject</a>, <a href="#group___webs_runtime_1ga147dadfb8200bc1df51ea64bbaae5db2" class="ref">wfreeHandle</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga92d28da02bc2d5a00940a3ee24070b92"></a>
- <div class="api">
- <div class="prototype">
- typedef int(* SocketAccept)(int sid, cchar *ipaddr, int port, int listenSid).
- </div>
- <div class="apiDetail">
- <p>Socket accept callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle for the newly accepted socket.</td>
- <tr><td class="param">ipaddr</td><td>IP address of the connecting client.</td>
- <tr><td class="param">port</td><td>Port of the connecting client.</td>
- <tr><td class="param">listenSid</td><td>Socket ID for the listening socket.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="group___webs_socket_1ga657e287f5f61294f65c3092a0e0b5e18"></a>
- <div class="api">
- <div class="prototype">
- typedef void(* SocketHandler)(int sid, int mask, void *data).
- </div>
- <div class="apiDetail">
- <p>Socket I/O callback.</p>
- <dl><dt>Parameters:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">sid</td><td>Socket ID handle returned from socketConnect or when a new socket is passed to a SocketAccept callback.</td>
- <tr><td class="param">mask</td><td>Mask of events of interest. Set to SOCKET_READABLE | SOCKET_WRITABLE | SOCKET_EXCEPTION.</td>
- <tr><td class="param">data</td><td>Data argument to pass to the callback function.</td>
- </table></dd></dl>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>See Also:</dt><dd>
- <a href="#group___webs_socket_1gac14f3548201f71b558822b3c68153ebe" class="ref">socketAddress</a>, <a href="#group___webs_socket_1ga0c7d4452b77a1bb3095b24e2a61973d5" class="ref">socketAddressIsV6</a>, <a href="#group___webs_socket_1gadc4743b09e663cfa4fa59ad8679cf047" class="ref">socketAlloc</a>, <a href="#group___webs_socket_1gad7e885e55895fca1a1cdb9657d628959" class="ref">socketClose</a>, <a href="#group___webs_socket_1ga08b16008980854d2aa6d1ebf588724a7" class="ref">socketCloseConnection</a>, <a href="#group___webs_socket_1ga860aa94cb98a3f2c67426695060dba0c" class="ref">socketCreateHandler</a>, <a href="#group___webs_socket_1gab7e5de92ef3adf4262ccf4e5faacf150" class="ref">socketEof</a>, <a href="#group___webs_socket_1gaff7039dc3fc07516017caf5a2b434dad" class="ref">socketFree</a>, <a href="#group___webs_socket_1ga19ea155313fd58c2f9842185388e60f7" class="ref">socketGetBlock</a>, <a href="#group___webs_socket_1gad5f2ef131f0ca1222ee4897589f9dc04" class="ref">socketGetError</a>, <a href="#group___webs_socket_1ga089eca4cadf481a213f44dcb783afe83" class="ref">socketGetHandle</a>, <a href="#group___webs_socket_1ga41ef4201ad35371958671487b56689e3" class="ref">socketGetPort</a>, <a href="#group___webs_socket_1gabd3226bb7b28114550f997df00067f8c" class="ref">socketInfo</a>, <a href="#group___webs_socket_1ga4f30ba4ad13456067e09eef36778caba" class="ref">socketIsV6</a>, <a href="#group___webs_socket_1ga0a776cf248c686363c87658082170a16" class="ref">socketListen</a>, <a href="#group___webs_socket_1ga1865f03055c014b5382e8d4a16ae9522" class="ref">socketOpen</a>, <a href="#group___webs_socket_1gab341c6634c368ce4163bd88ccd2abcbd" class="ref">socketParseAddress</a>, <a href="#group___webs_socket_1gaa5aac3322c1eb29911e40c7b3058be15" class="ref">socketProcess</a>, <a href="#group___webs_socket_1gaf627805ebf8640d0ae8d81684e07f67f" class="ref">socketPtr</a>, <a href="#group___webs_socket_1ga19822e9bedff6170ab41c053a9ee29f8" class="ref">socketRead</a>, <a href="#group___webs_socket_1gad9ad9874969bd051043a41147f5a9f01" class="ref">socketRegisterInterest</a>, <a href="#group___webs_socket_1ga84620d0cf38e9279f91e6c71364233ac" class="ref">socketReservice</a>, <a href="#group___webs_socket_1gaa4d7c7dee5c5104c2f19b7b702ee8c4f" class="ref">socketSelect</a>, <a href="#group___webs_socket_1ga87a2c90218477d33c088510d629174c7" class="ref">socketSetBlock</a>, <a href="#group___webs_socket_1ga5c81a3a08f01ced0e6346142663c0bac" class="ref">socketSetError</a>, <a href="#group___webs_socket_1gafeb307811160403ba50be3739ddaf5f9" class="ref">socketWaitForEvent</a>, <a href="#group___webs_socket_1gab6d98261221e514d69b3f4e411fdea4a" class="ref">socketWrite</a></dd></dl>
- </div>
- </div>
- <a name="struct_webs_error"></a>
- <div class="api">
- <div class="prototype">WebsError</div>
- <div class="apiDetail">
- <p>Error code list.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">int</td><td><td>code</td><td>
- HTTP error code.
- </td>
- <tr><td class="param">char *</td><td><td>msg</td><td>
- HTTP error message.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_file_info"></a>
- <div class="api">
- <div class="prototype">WebsFileInfo</div>
- <div class="apiDetail">
- <p>File information structure.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">int</td><td><td>isDir</td><td>
- Set if directory.
- </td>
- <tr><td class="param">WebsTime</td><td><td>mtime</td><td>
- Modified time.
- </td>
- <tr><td class="param">ulong</td><td><td>size</td><td>
- File length.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_handler"></a>
- <div class="api">
- <div class="prototype">WebsHandler</div>
- <div class="apiDetail">
- <p>GoAhead handler object.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param"><a class="ref" href="#group___webs_1gaaf026187015f50b6c6068f996cad29fc">WebsHandlerClose</a></td><td><td>close</td><td>
- Handler close callback.
- </td>
- <tr><td class="param">int</td><td><td>flags</td><td>
- Handler control flags.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442">WebsHandlerProc</a></td><td><td>match</td><td>
- Handler match callback.
- </td>
- <tr><td class="param">char *</td><td><td>name</td><td>
- Handler name.
- </td>
- <tr><td class="param"><a class="ref" href="#group___webs_1ga6bc0396b0693e1501f5af39cab73e442">WebsHandlerProc</a></td><td><td>service</td><td>
- Handler service callback.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_mime"></a>
- <div class="api">
- <div class="prototype">WebsMime</div>
- <div class="apiDetail">
- <p>Mime type list.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">char *</td><td><td>ext</td><td>
- File extension.
- </td>
- <tr><td class="param">char *</td><td><td>type</td><td>
- Mime type.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_role"></a>
- <div class="api">
- <div class="prototype">WebsRole</div>
- <div class="apiDetail">
- <p>Role definition structure.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
- Resolved role abilities.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_rom_index"></a>
- <div class="api">
- <div class="prototype">WebsRomIndex</div>
- <div class="apiDetail">
- <p>Compiled Rom Page Index.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">uchar *</td><td><td>page</td><td>
- Web page data.
- </td>
- <tr><td class="param">char *</td><td><td>path</td><td>
- Web page URL path.
- </td>
- <tr><td class="param">Offset</td><td><td>pos</td><td>
- Current read position.
- </td>
- <tr><td class="param">int</td><td><td>size</td><td>
- Size of web page in bytes.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_user"></a>
- <div class="api">
- <div class="prototype">WebsUser</div>
- <div class="apiDetail">
- <p>User definition structure.</p>
- <dl><dt><b>API</b> Stability:</dt><dd>Stable.</dd></dl>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- <tr><td class="param">WebsHash</td><td><td>abilities</td><td>
- Resolved user abilities.
- </td>
- <tr><td class="param">char *</td><td><td>name</td><td>
- User name.
- </td>
- <tr><td class="param">char *</td><td><td>password</td><td>
- User password (encrypted).
- </td>
- <tr><td class="param">char *</td><td><td>roles</td><td>
- User roles.
- </td>
- </table></dd></dl>
- </div>
- </div>
- <a name="struct_webs_value"></a>
- <div class="api">
- <div class="prototype">WebsValue</div>
- <div class="apiDetail">
- <p>Value union to store primitive value types.</p>
- <dl><dt>Fields:</dt><dd>
- <table class="parameters" title="Parameters">
- </table></dd></dl>
- </div>
- </div>
|