[{"data":1,"prerenderedAt":1099},["ShallowReactive",2],{"navigation":3,"-adapters-cloudflare":83,"-adapters-cloudflare-surround":1094},[4,46],{"title":5,"path":6,"stem":7,"children":8,"icon":10},"Guide","\u002Fguide","1.guide\u002F1.index",[9,11,16,21,26,31,36,41],{"title":5,"path":6,"stem":7,"icon":10},"ph:book-open-duotone",{"title":12,"path":13,"stem":14,"icon":15},"Hooks","\u002Fguide\u002Fhooks","1.guide\u002F2.hooks","material-symbols-light:data-object",{"title":17,"path":18,"stem":19,"icon":20},"Peer","\u002Fguide\u002Fpeer","1.guide\u002F3.peer","mynaui:api",{"title":22,"path":23,"stem":24,"icon":25},"Message","\u002Fguide\u002Fmessage","1.guide\u002F4.message","solar:letter-line-duotone",{"title":27,"path":28,"stem":29,"icon":30},"Pub \u002F Sub","\u002Fguide\u002Fpubsub","1.guide\u002F5.pubsub","simple-icons:googlepubsub",{"title":32,"path":33,"stem":34,"icon":35},"Sync Backplane","\u002Fguide\u002Fsync","1.guide\u002F6.sync","tabler:refresh",{"title":37,"path":38,"stem":39,"icon":40},"Resolver API","\u002Fguide\u002Fresolver","1.guide\u002F7.resolver","tabler:route",{"title":42,"path":43,"stem":44,"icon":45},"WebSocket Proxy","\u002Fguide\u002Fproxy","1.guide\u002F8.proxy","tabler:arrows-exchange",{"title":47,"path":48,"stem":49,"children":50,"icon":52},"Adapters","\u002Fadapters","2.adapters\u002F1.index",[51,53,58,63,68,73,78],{"title":47,"path":48,"stem":49,"icon":52},"emojione-monotone:electric-plug",{"title":54,"path":55,"stem":56,"icon":57},"Bun","\u002Fadapters\u002Fbun","2.adapters\u002Fbun","simple-icons:bun",{"title":59,"path":60,"stem":61,"icon":62},"Bunny","\u002Fadapters\u002Fbunny","2.adapters\u002Fbunny","mdi:rabbit",{"title":64,"path":65,"stem":66,"icon":67},"Cloudflare","\u002Fadapters\u002Fcloudflare","2.adapters\u002Fcloudflare","devicon-plain:cloudflareworkers",{"title":69,"path":70,"stem":71,"icon":72},"Deno","\u002Fadapters\u002Fdeno","2.adapters\u002Fdeno","teenyicons:deno-solid",{"title":74,"path":75,"stem":76,"icon":77},"Node.js","\u002Fadapters\u002Fnode","2.adapters\u002Fnode","akar-icons:node-fill",{"title":79,"path":80,"stem":81,"icon":82},"SSE","\u002Fadapters\u002Fsse","2.adapters\u002Fsse","clarity:two-way-arrows-line",{"id":84,"title":64,"body":85,"description":1088,"extension":1089,"meta":1090,"navigation":1091,"path":65,"seo":1092,"stem":66,"__hash__":1093},"content\u002F2.adapters\u002Fcloudflare.md",{"type":86,"value":87,"toc":1084,"icon":67},"minimark",[88,115,126,725,732,801,823,828,848,902,906,925,960,1027,1030,1080],[89,90,91,92,99,100,103,104,109,110,114],"p",{},"To integrate crossws with Cloudflare ",[93,94,98],"a",{"href":95,"rel":96},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fapi\u002Fwebsockets\u002F",[97],"nofollow","Durable Objects"," with ",[93,101,102],{"href":28},"pub\u002Fsub"," and ",[93,105,108],{"href":106,"rel":107},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fdurable-objects\u002Fbest-practices\u002Fwebsockets\u002F#websocket-hibernation-api",[97],"hibernation API"," support, you need to check for the ",[111,112,113],"code",{},"upgrade"," header and additionally export a DurableObject with crossws adapter hooks integrated.",[116,117,118],"note",{},[89,119,120,121,125],{},"\nIf you skip durable object class export or in cases the binding is unavailable, crossws uses a ",[122,123,124],"strong",{},"fallback mode"," without pub\u002Fsub support in the same worker.",[127,128,133],"pre",{"className":129,"code":130,"language":131,"meta":132,"style":132},"language-js shiki shiki-themes github-light github-dark github-dark","import { DurableObject } from \"cloudflare:workers\";\nimport crossws from \"crossws\u002Fadapters\u002Fcloudflare\";\n\nconst ws = crossws({\n  \u002F\u002F bindingName: \"$DurableObject\",\n  \u002F\u002F instanceName: \"crossws\",\n  hooks: {\n    message: console.log,\n    open(peer) {\n      peer.subscribe(\"chat\");\n      peer.publish(\"chat\", { user: \"server\", message: `${peer} joined!` });\n    },\n  },\n});\n\nexport default {\n  async fetch(request, env, context) {\n    if (request.headers.get(\"upgrade\") === \"websocket\") {\n      return ws.handleUpgrade(request, env, context);\n    }\n    return new Response(\n      `\u003Cscript>new WebSocket(\"ws:\u002F\u002Flocalhost:3000\").addEventListener(\"open\", (e) => e.target.send(\"Hello from client!\"));\u003C\u002Fscript>`,\n      { headers: { \"content-type\": \"text\u002Fhtml\" } },\n    );\n  },\n};\n\nexport class $DurableObject extends DurableObject {\n  constructor(state, env) {\n    super(state, env);\n    ws.handleDurableInit(this, state, env);\n  }\n\n  fetch(request) {\n    return ws.handleDurableUpgrade(this, request);\n  }\n\n  webSocketMessage(client, message) {\n    return ws.handleDurableMessage(this, client, message);\n  }\n\n  webSocketPublish(topic, message, opts) {\n    return ws.handleDurablePublish(this, topic, message, opts);\n  }\n\n  webSocketClose(client, code, reason, wasClean) {\n    return ws.handleDurableClose(this, client, code, reason, wasClean);\n  }\n}\n","js","",[111,134,135,158,173,180,200,207,213,219,225,241,258,290,296,302,308,313,325,352,380,395,401,416,425,443,449,454,460,465,484,501,510,527,533,538,550,567,572,577,595,612,617,622,644,661,666,671,697,714,719],{"__ignoreMap":132},[136,137,140,144,148,151,155],"span",{"class":138,"line":139},"line",1,[136,141,143],{"class":142},"so5gQ","import",[136,145,147],{"class":146},"slsVL"," { DurableObject } ",[136,149,150],{"class":142},"from",[136,152,154],{"class":153},"sfrk1"," \"cloudflare:workers\"",[136,156,157],{"class":146},";\n",[136,159,161,163,166,168,171],{"class":138,"line":160},2,[136,162,143],{"class":142},[136,164,165],{"class":146}," crossws ",[136,167,150],{"class":142},[136,169,170],{"class":153}," \"crossws\u002Fadapters\u002Fcloudflare\"",[136,172,157],{"class":146},[136,174,176],{"class":138,"line":175},3,[136,177,179],{"emptyLinePlaceholder":178},true,"\n",[136,181,183,186,190,193,197],{"class":138,"line":182},4,[136,184,185],{"class":142},"const",[136,187,189],{"class":188},"suiK_"," ws",[136,191,192],{"class":142}," =",[136,194,196],{"class":195},"shcOC"," crossws",[136,198,199],{"class":146},"({\n",[136,201,203],{"class":138,"line":202},5,[136,204,206],{"class":205},"sCsY4","  \u002F\u002F bindingName: \"$DurableObject\",\n",[136,208,210],{"class":138,"line":209},6,[136,211,212],{"class":205},"  \u002F\u002F instanceName: \"crossws\",\n",[136,214,216],{"class":138,"line":215},7,[136,217,218],{"class":146},"  hooks: {\n",[136,220,222],{"class":138,"line":221},8,[136,223,224],{"class":146},"    message: console.log,\n",[136,226,228,231,234,238],{"class":138,"line":227},9,[136,229,230],{"class":195},"    open",[136,232,233],{"class":146},"(",[136,235,237],{"class":236},"sQHwn","peer",[136,239,240],{"class":146},") {\n",[136,242,244,247,250,252,255],{"class":138,"line":243},10,[136,245,246],{"class":146},"      peer.",[136,248,249],{"class":195},"subscribe",[136,251,233],{"class":146},[136,253,254],{"class":153},"\"chat\"",[136,256,257],{"class":146},");\n",[136,259,261,263,266,268,270,273,276,279,282,284,287],{"class":138,"line":260},11,[136,262,246],{"class":146},[136,264,265],{"class":195},"publish",[136,267,233],{"class":146},[136,269,254],{"class":153},[136,271,272],{"class":146},", { user: ",[136,274,275],{"class":153},"\"server\"",[136,277,278],{"class":146},", message: ",[136,280,281],{"class":153},"`${",[136,283,237],{"class":146},[136,285,286],{"class":153},"} joined!`",[136,288,289],{"class":146}," });\n",[136,291,293],{"class":138,"line":292},12,[136,294,295],{"class":146},"    },\n",[136,297,299],{"class":138,"line":298},13,[136,300,301],{"class":146},"  },\n",[136,303,305],{"class":138,"line":304},14,[136,306,307],{"class":146},"});\n",[136,309,311],{"class":138,"line":310},15,[136,312,179],{"emptyLinePlaceholder":178},[136,314,316,319,322],{"class":138,"line":315},16,[136,317,318],{"class":142},"export",[136,320,321],{"class":142}," default",[136,323,324],{"class":146}," {\n",[136,326,328,331,334,336,339,342,345,347,350],{"class":138,"line":327},17,[136,329,330],{"class":142},"  async",[136,332,333],{"class":195}," fetch",[136,335,233],{"class":146},[136,337,338],{"class":236},"request",[136,340,341],{"class":146},", ",[136,343,344],{"class":236},"env",[136,346,341],{"class":146},[136,348,349],{"class":236},"context",[136,351,240],{"class":146},[136,353,355,358,361,364,366,369,372,375,378],{"class":138,"line":354},18,[136,356,357],{"class":142},"    if",[136,359,360],{"class":146}," (request.headers.",[136,362,363],{"class":195},"get",[136,365,233],{"class":146},[136,367,368],{"class":153},"\"upgrade\"",[136,370,371],{"class":146},") ",[136,373,374],{"class":142},"===",[136,376,377],{"class":153}," \"websocket\"",[136,379,240],{"class":146},[136,381,383,386,389,392],{"class":138,"line":382},19,[136,384,385],{"class":142},"      return",[136,387,388],{"class":146}," ws.",[136,390,391],{"class":195},"handleUpgrade",[136,393,394],{"class":146},"(request, env, context);\n",[136,396,398],{"class":138,"line":397},20,[136,399,400],{"class":146},"    }\n",[136,402,404,407,410,413],{"class":138,"line":403},21,[136,405,406],{"class":142},"    return",[136,408,409],{"class":142}," new",[136,411,412],{"class":195}," Response",[136,414,415],{"class":146},"(\n",[136,417,419,422],{"class":138,"line":418},22,[136,420,421],{"class":153},"      `\u003Cscript>new WebSocket(\"ws:\u002F\u002Flocalhost:3000\").addEventListener(\"open\", (e) => e.target.send(\"Hello from client!\"));\u003C\u002Fscript>`",[136,423,424],{"class":146},",\n",[136,426,428,431,434,437,440],{"class":138,"line":427},23,[136,429,430],{"class":146},"      { headers: { ",[136,432,433],{"class":153},"\"content-type\"",[136,435,436],{"class":146},": ",[136,438,439],{"class":153},"\"text\u002Fhtml\"",[136,441,442],{"class":146}," } },\n",[136,444,446],{"class":138,"line":445},24,[136,447,448],{"class":146},"    );\n",[136,450,452],{"class":138,"line":451},25,[136,453,301],{"class":146},[136,455,457],{"class":138,"line":456},26,[136,458,459],{"class":146},"};\n",[136,461,463],{"class":138,"line":462},27,[136,464,179],{"emptyLinePlaceholder":178},[136,466,468,470,473,476,479,482],{"class":138,"line":467},28,[136,469,318],{"class":142},[136,471,472],{"class":142}," class",[136,474,475],{"class":195}," $DurableObject",[136,477,478],{"class":142}," extends",[136,480,481],{"class":195}," DurableObject",[136,483,324],{"class":146},[136,485,487,490,492,495,497,499],{"class":138,"line":486},29,[136,488,489],{"class":142},"  constructor",[136,491,233],{"class":146},[136,493,494],{"class":236},"state",[136,496,341],{"class":146},[136,498,344],{"class":236},[136,500,240],{"class":146},[136,502,504,507],{"class":138,"line":503},30,[136,505,506],{"class":188},"    super",[136,508,509],{"class":146},"(state, env);\n",[136,511,513,516,519,521,524],{"class":138,"line":512},31,[136,514,515],{"class":146},"    ws.",[136,517,518],{"class":195},"handleDurableInit",[136,520,233],{"class":146},[136,522,523],{"class":188},"this",[136,525,526],{"class":146},", state, env);\n",[136,528,530],{"class":138,"line":529},32,[136,531,532],{"class":146},"  }\n",[136,534,536],{"class":138,"line":535},33,[136,537,179],{"emptyLinePlaceholder":178},[136,539,541,544,546,548],{"class":138,"line":540},34,[136,542,543],{"class":195},"  fetch",[136,545,233],{"class":146},[136,547,338],{"class":236},[136,549,240],{"class":146},[136,551,553,555,557,560,562,564],{"class":138,"line":552},35,[136,554,406],{"class":142},[136,556,388],{"class":146},[136,558,559],{"class":195},"handleDurableUpgrade",[136,561,233],{"class":146},[136,563,523],{"class":188},[136,565,566],{"class":146},", request);\n",[136,568,570],{"class":138,"line":569},36,[136,571,532],{"class":146},[136,573,575],{"class":138,"line":574},37,[136,576,179],{"emptyLinePlaceholder":178},[136,578,580,583,585,588,590,593],{"class":138,"line":579},38,[136,581,582],{"class":195},"  webSocketMessage",[136,584,233],{"class":146},[136,586,587],{"class":236},"client",[136,589,341],{"class":146},[136,591,592],{"class":236},"message",[136,594,240],{"class":146},[136,596,598,600,602,605,607,609],{"class":138,"line":597},39,[136,599,406],{"class":142},[136,601,388],{"class":146},[136,603,604],{"class":195},"handleDurableMessage",[136,606,233],{"class":146},[136,608,523],{"class":188},[136,610,611],{"class":146},", client, message);\n",[136,613,615],{"class":138,"line":614},40,[136,616,532],{"class":146},[136,618,620],{"class":138,"line":619},41,[136,621,179],{"emptyLinePlaceholder":178},[136,623,625,628,630,633,635,637,639,642],{"class":138,"line":624},42,[136,626,627],{"class":195},"  webSocketPublish",[136,629,233],{"class":146},[136,631,632],{"class":236},"topic",[136,634,341],{"class":146},[136,636,592],{"class":236},[136,638,341],{"class":146},[136,640,641],{"class":236},"opts",[136,643,240],{"class":146},[136,645,647,649,651,654,656,658],{"class":138,"line":646},43,[136,648,406],{"class":142},[136,650,388],{"class":146},[136,652,653],{"class":195},"handleDurablePublish",[136,655,233],{"class":146},[136,657,523],{"class":188},[136,659,660],{"class":146},", topic, message, opts);\n",[136,662,664],{"class":138,"line":663},44,[136,665,532],{"class":146},[136,667,669],{"class":138,"line":668},45,[136,670,179],{"emptyLinePlaceholder":178},[136,672,674,677,679,681,683,685,687,690,692,695],{"class":138,"line":673},46,[136,675,676],{"class":195},"  webSocketClose",[136,678,233],{"class":146},[136,680,587],{"class":236},[136,682,341],{"class":146},[136,684,111],{"class":236},[136,686,341],{"class":146},[136,688,689],{"class":236},"reason",[136,691,341],{"class":146},[136,693,694],{"class":236},"wasClean",[136,696,240],{"class":146},[136,698,700,702,704,707,709,711],{"class":138,"line":699},47,[136,701,406],{"class":142},[136,703,388],{"class":146},[136,705,706],{"class":195},"handleDurableClose",[136,708,233],{"class":146},[136,710,523],{"class":188},[136,712,713],{"class":146},", client, code, reason, wasClean);\n",[136,715,717],{"class":138,"line":716},48,[136,718,532],{"class":146},[136,720,722],{"class":138,"line":721},49,[136,723,724],{"class":146},"}\n",[89,726,727,728,731],{},"Update your ",[111,729,730],{},"wrangler.toml"," to specify Durable object:",[127,733,737],{"className":734,"code":735,"language":736,"meta":132,"style":132},"language-ini shiki shiki-themes github-light github-dark github-dark","[[durable_objects.bindings]]\nname = \"$DurableObject\"\nclass_name = \"$DurableObject\"\n\n[[migrations]]\ntag = \"v1\"\nnew_classes = [\"$DurableObject\"]\n","ini",[111,738,739,747,758,767,771,778,788],{"__ignoreMap":132},[136,740,741,744],{"class":138,"line":139},[136,742,743],{"class":195},"[[durable_objects.bindings]",[136,745,746],{"class":146},"]\n",[136,748,749,752,755],{"class":138,"line":160},[136,750,751],{"class":142},"name",[136,753,754],{"class":146}," = ",[136,756,757],{"class":153},"\"$DurableObject\"\n",[136,759,760,763,765],{"class":138,"line":175},[136,761,762],{"class":142},"class_name",[136,764,754],{"class":146},[136,766,757],{"class":153},[136,768,769],{"class":138,"line":182},[136,770,179],{"emptyLinePlaceholder":178},[136,772,773,776],{"class":138,"line":202},[136,774,775],{"class":195},"[[migrations]",[136,777,746],{"class":146},[136,779,780,783,785],{"class":138,"line":209},[136,781,782],{"class":142},"tag",[136,784,754],{"class":146},[136,786,787],{"class":153},"\"v1\"\n",[136,789,790,793,796,799],{"class":138,"line":215},[136,791,792],{"class":142},"new_classes",[136,794,795],{"class":146}," = [",[136,797,798],{"class":153},"\"$DurableObject\"",[136,800,746],{"class":146},[802,803,804],"read-more",{},[89,805,806,807,814,815,822],{},"See ",[93,808,811],{"href":809,"rel":810},"https:\u002F\u002Fgithub.com\u002Fh3js\u002Fcrossws\u002Fblob\u002Fmain\u002Ftest\u002Ffixture\u002Fcloudflare-durable.ts",[97],[111,812,813],{},"test\u002Ffixture\u002Fcloudflare-durable.ts"," for demo and ",[93,816,819],{"href":817,"rel":818},"https:\u002F\u002Fgithub.com\u002Fh3js\u002Fcrossws\u002Fblob\u002Fmain\u002Fsrc\u002Fadapters\u002Fcloudflare.ts",[97],[111,820,821],{},"src\u002Fadapters\u002Fcloudflare.ts"," for implementation.",[824,825,827],"h3",{"id":826},"adapter-options","Adapter options",[116,829,830],{},[89,831,832,833,836,837,839,840,843,844,847],{},"\nBy default, crossws uses the durable object class ",[111,834,835],{},"$DurableObject"," from ",[111,838,344],{}," with an instance named ",[111,841,842],{},"crossws",".\nYou can customize this behavior by providing ",[111,845,846],{},"resolveDurableStub"," option.",[849,850,851,861,869,879,892],"ul",{},[852,853,854,857,858,860],"li",{},[111,855,856],{},"bindingName",": Durable Object binding name from environment (default: ",[111,859,835],{},").",[852,862,863,866,867,860],{},[111,864,865],{},"instanceName",": Durable Object instance name (default: ",[111,868,842],{},[852,870,871,873,874,103,876,878],{},[111,872,846],{},": Custom function that resolves Durable Object binding to handle the WebSocket upgrade. This option will override ",[111,875,856],{},[111,877,865],{},".",[852,880,881,884,885,888,889,891],{},[111,882,883],{},"sync",": Optional ",[93,886,887],{"href":33},"sync backplane"," to relay ",[93,890,102],{"href":28}," across instances (see below).",[852,893,894,897,898,878],{},[111,895,896],{},"onError",": Observe sync backplane failures. See ",[93,899,901],{"href":900},"\u002Fguide\u002Fsync#delivery-semantics","delivery semantics",[824,903,905],{"id":904},"sync-across-instances","Sync across instances",[89,907,908,909,911,912,914,915,917,918,921,922,924],{},"The ",[93,910,887],{"href":33}," relays ",[93,913,102],{"href":28}," between crossws instances, but on Cloudflare the model is different from a Node-style cluster — so reach for it only when you actually need it. A backplane on Cloudflare requires ",[122,916,98],{},": only a Durable Object's context owns its (hibernatable) sockets via ",[111,919,920],{},"ctx.getWebSockets()"," and can fan a message out to them. In ",[122,923,124],{}," (no Durable Object binding) each connection is a separate Worker invocation that can't send to another connection's socket, so pub\u002Fsub — and a backplane — are not supported there.",[849,926,927,944],{},[852,928,929,932,933,936,937,940,941],{},[122,930,931],{},"Single Durable Object (the default)."," With one instance (",[111,934,935],{},"\"crossws\"","), every connection across your app already lands on that same Durable Object, so ",[111,938,939],{},"peer.publish()"," is cluster-global out of the box. ",[122,942,943],{},"No backplane needed.",[852,945,946,949,950,953,954,956,957,959],{},[122,947,948],{},"Sharded Durable Objects."," If you fan connections across ",[122,951,952],{},"multiple"," instances (e.g. one per room via ",[111,955,846],{},"), a publish in one instance won't reach the others — a ",[111,958,883],{}," backplane bridges them.",[127,961,963],{"className":129,"code":962,"language":131,"meta":132,"style":132},"import crossws from \"crossws\u002Fadapters\u002Fcloudflare\";\nimport type { SyncAdapter } from \"crossws\";\n\nconst ws = crossws({\n  hooks,\n  sync: myBackplane, \u002F\u002F a custom SyncAdapter (see caveats below)\n});\n",[111,964,965,977,994,998,1010,1015,1023],{"__ignoreMap":132},[136,966,967,969,971,973,975],{"class":138,"line":139},[136,968,143],{"class":142},[136,970,165],{"class":146},[136,972,150],{"class":142},[136,974,170],{"class":153},[136,976,157],{"class":146},[136,978,979,981,984,987,989,992],{"class":138,"line":160},[136,980,143],{"class":142},[136,982,983],{"class":142}," type",[136,985,986],{"class":146}," { SyncAdapter } ",[136,988,150],{"class":142},[136,990,991],{"class":153}," \"crossws\"",[136,993,157],{"class":146},[136,995,996],{"class":138,"line":175},[136,997,179],{"emptyLinePlaceholder":178},[136,999,1000,1002,1004,1006,1008],{"class":138,"line":182},[136,1001,185],{"class":142},[136,1003,189],{"class":188},[136,1005,192],{"class":142},[136,1007,196],{"class":195},[136,1009,199],{"class":146},[136,1011,1012],{"class":138,"line":202},[136,1013,1014],{"class":146},"  hooks,\n",[136,1016,1017,1020],{"class":138,"line":209},[136,1018,1019],{"class":146},"  sync: myBackplane, ",[136,1021,1022],{"class":205},"\u002F\u002F a custom SyncAdapter (see caveats below)\n",[136,1024,1025],{"class":138,"line":215},[136,1026,307],{"class":146},[89,1028,1029],{},"Two Cloudflare-specific caveats:",[849,1031,1032,1053],{},[852,1033,1034,1037,1038,1040,1041,1045,1046,1049,1050,1052],{},[122,1035,1036],{},"Inbound delivery into a Durable Object is best-effort."," crossws seeds the fan-out of a relayed message from the instance's in-memory peer map, which a hibernated\u002Fevicted Durable Object loses even though its sockets survive in ",[111,1039,920],{},". A message relayed ",[1042,1043,1044],"em",{},"into"," a hibernated Durable Object may miss some sockets. ",[122,1047,1048],{},"Outbound"," relay — a ",[111,1051,939],{}," in a Durable Object reaching the backplane — is reliable.",[852,1054,1055,1058,1059,1062,1063,1066,1067,1073,1074,1079],{},[122,1056,1057],{},"Bring a Cloudflare-native driver."," The built-in ",[111,1060,1061],{},"redis"," \u002F ",[111,1064,1065],{},"pgsql"," drivers open persistent connections and target Node-like runtimes, so they won't run inside workerd. Write a custom ",[93,1068,1070],{"href":1069},"\u002Fguide\u002Fsync#writing-a-driver",[111,1071,1072],{},"SyncAdapter"," over a Cloudflare-native transport (a coordinator Durable Object, ",[93,1075,1078],{"href":1076,"rel":1077},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Fqueues\u002F",[97],"Queues",", or fetch-based pub\u002Fsub) instead.",[1081,1082,1083],"style",{},"html pre.shiki code .so5gQ, html code.shiki .so5gQ{--shiki-light:#D73A49;--shiki-default:#F97583;--shiki-dark:#F97583}html pre.shiki code .slsVL, html code.shiki .slsVL{--shiki-light:#24292E;--shiki-default:#E1E4E8;--shiki-dark:#E1E4E8}html pre.shiki code .sfrk1, html code.shiki .sfrk1{--shiki-light:#032F62;--shiki-default:#9ECBFF;--shiki-dark:#9ECBFF}html pre.shiki code .suiK_, html code.shiki .suiK_{--shiki-light:#005CC5;--shiki-default:#79B8FF;--shiki-dark:#79B8FF}html pre.shiki code .shcOC, html code.shiki .shcOC{--shiki-light:#6F42C1;--shiki-default:#B392F0;--shiki-dark:#B392F0}html pre.shiki code .sCsY4, html code.shiki .sCsY4{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sQHwn, html code.shiki .sQHwn{--shiki-light:#E36209;--shiki-default:#FFAB70;--shiki-dark:#FFAB70}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);}",{"title":132,"searchDepth":160,"depth":160,"links":1085},[1086,1087],{"id":826,"depth":175,"text":827},{"id":904,"depth":175,"text":905},"Integrate crossws with Cloudflare Workers and Durable Objects.","md",{"icon":67},{"icon":67},{"title":64,"description":1088},"xXfeYUrLd4zaMDDT58ZqFVaS9nghUyY-DVcsg69NaS4",[1095,1097],{"title":59,"path":60,"stem":61,"description":1096,"icon":62,"children":-1},"Manually integrate crossws with Bunny.net Edge Scripting.",{"title":69,"path":70,"stem":71,"description":1098,"icon":72,"children":-1},"Manually integrate crossws with Deno.",1782852616979]