[{"data":1,"prerenderedAt":639},["ShallowReactive",2],{"navigation":3,"\u002Fgetting-started\u002Finstallation":129,"\u002Fgetting-started\u002Finstallation-surround":634},[4,27,65,107,125],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"MSRV","\u002Fgetting-started\u002Fmsrv","1.getting-started\u002F9.msrv",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Client","i-lucide-plug-zap","\u002Fclient","2.client",[33,37,41,45,49,53,57,61],{"title":34,"path":35,"stem":36},"Configuration","\u002Fclient\u002Fconfiguration","2.client\u002F1.configuration",{"title":38,"path":39,"stem":40},"Events and acks","\u002Fclient\u002Fevents-and-acks","2.client\u002F2.events-and-acks",{"title":42,"path":43,"stem":44},"Connection state","\u002Fclient\u002Fconnection-state","2.client\u002F3.connection-state",{"title":46,"path":47,"stem":48},"Transports and proxies","\u002Fclient\u002Ftransports-and-proxies","2.client\u002F4.transports-and-proxies",{"title":50,"path":51,"stem":52},"TLS","\u002Fclient\u002Ftls","2.client\u002F5.tls",{"title":54,"path":55,"stem":56},"Errors","\u002Fclient\u002Ferrors","2.client\u002F6.errors",{"title":58,"path":59,"stem":60},"Debugging","\u002Fclient\u002Fdebugging","2.client\u002F7.debugging",{"title":62,"path":63,"stem":64},"Blocking client","\u002Fclient\u002Fblocking","2.client\u002F8.blocking",{"title":66,"icon":67,"path":68,"stem":69,"children":70,"page":26},"Tauri plugin","i-simple-icons-tauri","\u002Ftauri","3.tauri",[71,75,79,83,87,91,95,99,103],{"title":72,"path":73,"stem":74},"Setup","\u002Ftauri\u002Fsetup","3.tauri\u002F1.setup",{"title":76,"path":77,"stem":78},"JavaScript API","\u002Ftauri\u002Fjavascript-api","3.tauri\u002F2.javascript-api",{"title":80,"path":81,"stem":82},"Rust API","\u002Ftauri\u002Frust-api","3.tauri\u002F3.rust-api",{"title":84,"path":85,"stem":86},"Permissions","\u002Ftauri\u002Fpermissions","3.tauri\u002F4.permissions",{"title":88,"path":89,"stem":90},"Security","\u002Ftauri\u002Fsecurity","3.tauri\u002F5.security",{"title":92,"path":93,"stem":94},"Messages and errors","\u002Ftauri\u002Fmessages-and-errors","3.tauri\u002F6.messages-and-errors",{"title":96,"path":97,"stem":98},"Troubleshooting","\u002Ftauri\u002Ftroubleshooting","3.tauri\u002F7.troubleshooting",{"title":100,"path":101,"stem":102},"Example app","\u002Ftauri\u002Fexample","3.tauri\u002F8.example",{"title":104,"path":105,"stem":106},"Plugin changelog","\u002Ftauri\u002Fchangelog","3.tauri\u002F9.changelog",{"title":108,"icon":109,"path":110,"stem":111,"children":112,"page":26},"Guides","i-lucide-book-open","\u002Fguides","4.guides",[113,117,121],{"title":114,"path":115,"stem":116},"Migration from rust_socketio","\u002Fguides\u002Fmigration","4.guides\u002F1.migration",{"title":118,"path":119,"stem":120},"Comparison","\u002Fguides\u002Fcomparison","4.guides\u002F2.comparison",{"title":122,"path":123,"stem":124},"Contributing","\u002Fguides\u002Fcontributing","4.guides\u002F3.contributing",{"title":126,"path":127,"stem":128},"Changelog","\u002Fchangelog","9.changelog",{"id":130,"title":15,"body":131,"description":628,"extension":629,"links":630,"meta":631,"navigation":434,"path":16,"seo":632,"stem":17,"__hash__":633},"docs\u002F1.getting-started\u002F2.installation.md",{"type":132,"value":133,"toc":622},"minimark",[134,252,268,273,372,494,498,578,582,604,608,618],[135,136,142],"pre",{"className":137,"code":138,"filename":139,"language":140,"meta":141,"style":141},"language-toml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","[dependencies]\nsocketio-next = \"0.1\"\ntokio = { version = \"1\", features = [\"macros\", \"rt-multi-thread\"] }\nserde_json = \"1\"\n","Cargo.toml","toml","",[143,144,145,161,181,238],"code",{"__ignoreMap":141},[146,147,150,154,158],"span",{"class":148,"line":149},"line",1,[146,151,153],{"class":152},"sMK4o","[",[146,155,157],{"class":156},"sBMFI","dependencies",[146,159,160],{"class":152},"]\n",[146,162,164,168,171,174,178],{"class":148,"line":163},2,[146,165,167],{"class":166},"sTEyZ","socketio-next ",[146,169,170],{"class":152},"=",[146,172,173],{"class":152}," \"",[146,175,177],{"class":176},"sfazB","0.1",[146,179,180],{"class":152},"\"\n",[146,182,184,187,189,192,195,197,199,202,205,208,211,213,216,218,221,223,225,227,230,232,235],{"class":148,"line":183},3,[146,185,186],{"class":166},"tokio ",[146,188,170],{"class":152},[146,190,191],{"class":152}," {",[146,193,194],{"class":166}," version ",[146,196,170],{"class":152},[146,198,173],{"class":152},[146,200,201],{"class":176},"1",[146,203,204],{"class":152},"\"",[146,206,207],{"class":152},",",[146,209,210],{"class":166}," features ",[146,212,170],{"class":152},[146,214,215],{"class":152}," [",[146,217,204],{"class":152},[146,219,220],{"class":176},"macros",[146,222,204],{"class":152},[146,224,207],{"class":152},[146,226,173],{"class":152},[146,228,229],{"class":176},"rt-multi-thread",[146,231,204],{"class":152},[146,233,234],{"class":152},"]",[146,236,237],{"class":152}," }\n",[146,239,241,244,246,248,250],{"class":148,"line":240},4,[146,242,243],{"class":166},"serde_json ",[146,245,170],{"class":152},[146,247,173],{"class":152},[146,249,201],{"class":176},[146,251,180],{"class":152},[253,254,255,256,259,260,263,264,267],"p",{},"The client runs on tokio. ",[143,257,258],{},"serde_json"," is only needed for ",[143,261,262],{},"json!"," and ",[143,265,266],{},"Value"," in your own code.",[269,270,272],"h2",{"id":271},"cargo-features","Cargo features",[274,275,276,292],"table",{},[277,278,279],"thead",{},[280,281,282,286,289],"tr",{},[283,284,285],"th",{},"Feature",[283,287,288],{},"Default",[283,290,291],{},"What",[293,294,295,313,326,342,354],"tbody",{},[280,296,297,303,306],{},[298,299,300],"td",{},[143,301,302],{},"rustls",[298,304,305],{},"yes",[298,307,308,309,312],{},"TLS with rustls (ring provider, Mozilla roots from ",[143,310,311],{},"webpki-roots","). Pure Rust: no OpenSSL, builds for Android and iOS.",[280,314,315,320,323],{},[298,316,317],{},[143,318,319],{},"native-tls",[298,321,322],{},"no",[298,324,325],{},"TLS with the platform library: OpenSSL on Linux, Security.framework on macOS, SChannel on Windows.",[280,327,328,333,335],{},[298,329,330],{},[143,331,332],{},"platform-verifier",[298,334,322],{},[298,336,337,338,341],{},"rustls checks certificates with the operating system's trust store (enterprise and user-installed CAs) through ",[143,339,340],{},"rustls-platform-verifier",", instead of the bundled Mozilla roots. Not on Android (it needs JVM setup there), which keeps the bundled roots.",[280,343,344,349,351],{},[298,345,346],{},[143,347,348],{},"cookies",[298,350,322],{},[298,352,353],{},"One cookie jar per client: cookies set by polling answers go back on later requests and on the websocket handshake (sticky sessions behind a load balancer).",[280,355,356,361,363],{},[298,357,358],{},[143,359,360],{},"blocking",[298,362,322],{},[298,364,365,371],{},[366,367,368],"a",{"href":63},[143,369,370],{},"socketio_next::blocking",": the same client with blocking methods and plain-closure handlers.",[135,373,375],{"className":137,"code":374,"language":140,"meta":141,"style":141},"# native-tls instead of rustls\nsocketio-next = { version = \"0.1\", default-features = false, features = [\"native-tls\"] }\n\n# rustls with the OS trust store, cookies and the blocking API\nsocketio-next = { version = \"0.1\", features = [\"platform-verifier\", \"cookies\", \"blocking\"] }\n",[143,376,377,383,430,436,441],{"__ignoreMap":141},[146,378,379],{"class":148,"line":149},[146,380,382],{"class":381},"sHwdD","# native-tls instead of rustls\n",[146,384,385,387,389,391,393,395,397,399,401,403,406,408,412,414,416,418,420,422,424,426,428],{"class":148,"line":163},[146,386,167],{"class":166},[146,388,170],{"class":152},[146,390,191],{"class":152},[146,392,194],{"class":166},[146,394,170],{"class":152},[146,396,173],{"class":152},[146,398,177],{"class":176},[146,400,204],{"class":152},[146,402,207],{"class":152},[146,404,405],{"class":166}," default-features ",[146,407,170],{"class":152},[146,409,411],{"class":410},"sfNiH"," false",[146,413,207],{"class":152},[146,415,210],{"class":166},[146,417,170],{"class":152},[146,419,215],{"class":152},[146,421,204],{"class":152},[146,423,319],{"class":176},[146,425,204],{"class":152},[146,427,234],{"class":152},[146,429,237],{"class":152},[146,431,432],{"class":148,"line":183},[146,433,435],{"emptyLinePlaceholder":434},true,"\n",[146,437,438],{"class":148,"line":240},[146,439,440],{"class":381},"# rustls with the OS trust store, cookies and the blocking API\n",[146,442,444,446,448,450,452,454,456,458,460,462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492],{"class":148,"line":443},5,[146,445,167],{"class":166},[146,447,170],{"class":152},[146,449,191],{"class":152},[146,451,194],{"class":166},[146,453,170],{"class":152},[146,455,173],{"class":152},[146,457,177],{"class":176},[146,459,204],{"class":152},[146,461,207],{"class":152},[146,463,210],{"class":166},[146,465,170],{"class":152},[146,467,215],{"class":152},[146,469,204],{"class":152},[146,471,332],{"class":176},[146,473,204],{"class":152},[146,475,207],{"class":152},[146,477,173],{"class":152},[146,479,348],{"class":176},[146,481,204],{"class":152},[146,483,207],{"class":152},[146,485,173],{"class":152},[146,487,360],{"class":176},[146,489,204],{"class":152},[146,491,234],{"class":152},[146,493,237],{"class":152},[269,495,497],{"id":496},"tls-backends","TLS backends",[499,500,501,531,551],"ul",{},[502,503,504,508,509,512,513,515,516,518,519,522,523,526,527,530],"li",{},[505,506,507],"strong",{},"Without TLS."," With ",[143,510,511],{},"default-features = false"," and neither ",[143,514,302],{}," nor ",[143,517,319],{},", the crate builds without any TLS code; ",[143,520,521],{},"https"," \u002F ",[143,524,525],{},"wss"," URLs then fail with ",[143,528,529],{},"TlsNotEnabled",".",[502,532,533,508,536,263,538,540,541,544,545,550],{},[505,534,535],{},"Both.",[143,537,302],{},[143,539,319],{},", rustls is the default and a ",[143,542,543],{},"native_tls::TlsConnector"," passed to ",[366,546,547],{"href":51},[143,548,549],{},"tls_config"," selects native-tls.",[502,552,553,559,560,562,563,566,567,570,571,574,575,577],{},[505,554,555,556,530],{},"reqwest's ",[143,557,558],{},"rustls-no-provider"," If another crate in your build turns on reqwest 0.13's ",[143,561,558],{}," feature (",[143,564,565],{},"tauri-plugin-updater"," does), reqwest needs a rustls provider even for plain ",[143,568,569],{},"http",": connecting then fails with ",[143,572,573],{},"TlsProviderMissing",". Enable ",[143,576,302],{}," here: it hands reqwest a ring-based configuration, no global provider needed.",[269,579,581],{"id":580},"requirements","Requirements",[499,583,584,589],{},[502,585,586,587,530],{},"Rust 1.85 (edition 2024), see ",[366,588,23],{"href":24},[502,590,591,592,595,596,599,600,603],{},"A Socket.IO ",[505,593,594],{},"v3 or v4"," server (Engine.IO v4). socket.io 2.x servers (Engine.IO v3) fail with ",[143,597,598],{},"IncompatibleServer"," or an ",[143,601,602],{},"InvalidHandshake"," naming Engine.IO v3.",[269,605,607],{"id":606},"tauri","Tauri",[253,609,610,611,614,615,530],{},"For a Tauri 2 app add the plugin instead; it re-exports the client crate as ",[143,612,613],{},"tauri_plugin_socketio::socketio_next",". See ",[366,616,617],{"href":73},"Tauri plugin setup",[619,620,621],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":141,"searchDepth":163,"depth":183,"links":623},[624,625,626,627],{"id":271,"depth":163,"text":272},{"id":496,"depth":163,"text":497},{"id":580,"depth":163,"text":581},{"id":606,"depth":163,"text":607},"Add socketio-next, pick a TLS backend and the optional features.","md",null,{},{"title":15,"description":628},"MMsvw0Xx3jzZ5bOFeDvmCk1QwhSxKW_KQqZeHT4257k",[635,637],{"title":11,"path":12,"stem":13,"description":636,"children":-1},"What socketio-next is, what it does like socket.io-client, and what lives in this repository.",{"title":19,"path":20,"stem":21,"description":638,"children":-1},"Connect, handle events, emit, wait for acks, watch the state and disconnect.",1795285663832]